Stakers can prevent losses by frontrunning bad debts. #1207
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-877
edited-by-warden
sufficient quality report
This report is 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/ProfitManager.sol#L309
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/loan/SurplusGuildMinter.sol#L158
Vulnerability details
Impact
The
SurplusGuildMinter
contract allows users to provide CREDIT tokens as first-loss capital to the surplus buffer of selected terms. In return, they can participate in the gauge voting system at a lower capital cost and without being affected by fluctuations in the price of GUILD token.If a bad debt occurs, there will be a loss and all the credit tokens allocated to that term/guage will become zero.
Stakers can prevent losses by unstaking credit tokens right before the liquidation transaction.
Proof of Concept
Copy and paste the following code into the
SurplusGuildMinterUnitTest.t.sol
file.Tools Used
VS Code
Recommended Mitigation Steps
Implement a cooldown or lock period for withdrawals.
Assessed type
Context
The text was updated successfully, but these errors were encountered: