If there are different offboard proccess at the same time user can reuse his vote to vote in severals procces, #798
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
insufficient quality report
This report is not of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/governance/LendingTermOffboarding.sol#L116
Vulnerability details
The supportOffboar function is just checking if the userWeight is equal to zero but not if the user already vote in the same snapshotBlock.
[Link].
This behavior is speccificaly in the LendingTermOffboarding.sol contract
Impact
User can vote with his maximus weigth at the same time in different off boarding procces is this offboarding procces was created at the same time.
Note that two or more offboarding procces can be started at the same time for a bad actor that know about the vulnerability and succesfully large holders can vote twice messing up the protocol, reusing his vote and offboarding more term that it should be.
Proof of Concept
The next POC is demostrating a user triple voting in the same timestamp, Run the test foundry in the
file:2023-12-ethereumcreditguild/test/unit/governance/LendingTermOffboarding.t.sol
Tools Used
Manual, Foundry
Recommended Mitigation Steps
Consider add a check if user already vote in the same snapshop to prevent users to reuse his vote in the same snapshop:
Assessed type
Other
The text was updated successfully, but these errors were encountered: