Any user can solely offboard a lending term if it was offboarded and re-onboarded #60
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
duplicate-1141
edited-by-warden
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/main/src/governance/LendingTermOffboarding.sol#L175-L199
Vulnerability details
Impact
When a loan term is offboarded and cleaned up, the contract does not clean/delete any mappings related to the offboarding proposal/votes, so when a loan term is offboarded and cleaned up, all votes and polls are still saved. So if a loan term was offboarded and for whatever reason was re-onboarded within 7 days, any user (with 1 voting power) can come in and solely offboard that lending term.
That user can call
supportOffboard
, he has 1 voting power (Guild token), with the expected parameters, it will bypass all checks, and when it reaches the following:it will flip the
canOffboard
flag on as all the previous votes are still there, and then he can easily calloffboard
andcleanup
.Impact:
Proof of Concept
Tools Used
Manual review + vscode
Recommended Mitigation Steps
Clean storage in
cleanup
.Assessed type
Governance
The text was updated successfully, but these errors were encountered: