Closed c4-bot-6 closed 8 months ago
alex-ppg marked the issue as primary issue
alex-ppg marked the issue as sufficient quality report
kupermind marked the issue as disagree with severity
kupermind (sponsor) acknowledged
dmvt marked the issue as selected for report
@c4-judge This issue relates to the issue #373, but it does not specify what is the exact issue that car arise. We acknowledge the issue, however this deserves a much smaller attention compared to #373.
dmvt marked the issue as duplicate of #373
dmvt changed the severity to 3 (High Risk)
dmvt marked the issue as partial-50
I agree with the sponsor on this one. The two issues are related and addressing the highest quality one addresses this. I've marked these as 50% due to the fact that as written they are medium, not high.
dmvt marked the issue as not selected for report
Lines of code
https://github.com/code-423n4/2023-12-autonolas/blob/2a095eb1f8359be349d23af67089795fb0be4ed1/tokenomics/contracts/Dispenser.sol#L98-L105 https://github.com/code-423n4/2023-12-autonolas/blob/2a095eb1f8359be349d23af67089795fb0be4ed1/tokenomics/contracts/Tokenomics.sol#L1144-L1149 https://github.com/code-423n4/2023-12-autonolas/blob/2a095eb1f8359be349d23af67089795fb0be4ed1/tokenomics/contracts/Treasury.sol#L412-L418 https://github.com/code-423n4/2023-12-autonolas/blob/2a095eb1f8359be349d23af67089795fb0be4ed1/governance/contracts/OLAS.sol#L75-L83
Vulnerability details
Impact
The service Owner loses all of his topUp savings in Olas when the inflation limit is hit
Proof of Concept
Assume, there has been donations to the service Id and it has collected some donations and has it stored in
1) User withdraws from claimOwnerIncentives() in Dispenser
2) accountOwnerIncentives in tokenomics resets reward and topUp
Here, we can see that reward and topup are set to 0 once the function is called. This is okay if we revert when transaction to service owner fails, but this wasn't done properly for topups.
3) withdrawToAccount in Treasury verifies sending rewards and topups
4) Olas mints token provided inflationControl is true
inflationControl checks if the amount requested can be satisfied with the current supply. In the case its not, mint fails silently while the top up earnings of service owner are nulled
Tools Used
Manual analysis
Recommended Mitigation Steps
provide proper checks for Olas mint, either revert if supply is unavailable or provide better checks in Treasury
Assessed type
Invalid Validation