User can keep claiming fees in the profit manager even with a loss in the gauge. #647
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-262
grade-c
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
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#L409
Vulnerability details
Users are presented with two options to vote for a gauge: through staking credit tokens in the SurplusGuildMinter or directly in the guild token using the incrementGauge function. Users possessing guild tokens have the flexibility to decide and vote for a gauge directly, earning fees from the interest paid by borrowers.
In the event of a gauge incurring a loss, users who voted for that gauge may face slashing. However, if no one takes the necessary action to slash these users, they can continue claiming fees in the profit manager. Note that this is not the same behavior if a user stake credit in the SurplusGuildMinter.
Impact
Users can continue claiming fees in the profit manager, even in the event of a loss in the associated gauge as long as they are not slashed by anyone.
Proof of Concept
Run the next test function in file:
Tools Used
Manual, Foundry
Recommended Mitigation Steps
Consider implementing a check to determine whether a user has already applied a loss or not in cases where a gauge is slashed.
Assessed type
Other
The text was updated successfully, but these errors were encountered: