SetLimit does not take into account burned OHM
The setLimit function in the BLVaultManagerLido contract does not account for the circulatingOhmBurned value, which can grow arbitrarily high. As a result, the admin cannot sufficiently restrict the manager's ability to mint new OHM tokens, as the vault can always mint at least the burned amount.
chaduke Follow with cducrest-brainbot
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2023-03-olympus-judging/issues/48
Found by
chaduke, cducrest-brainbot
Summary
The function setLimit() may not be able to sufficiently restrict mint ability of manager.
Vulnerability Detail
The setLimit() function reverts when newLimit_ < deployedOhm, mintOhmToVault will revert if deployedOhm + amount_ > ohmLimit + circulatingOhmBurned. If the value of circulatingOhmBurned is high, and the admin can only set the limit above deployedOhm, they could end up in a state where they cannot limit the amount the vault is allowed to burn sufficiently. I.e. the vault is always able to mint at least circulatingOhmBurned new tokens.
Note that circulatingOhmBurned is never lowered (even when minting new tokens), so this value could grow arbitrarily high.
Impact
Lack of control of admin on mint ability of manager.
Code Snippet
SetLimit function: https://github.com/sherlock-audit/2023-03-olympus/blob/main/sherlock-olympus/src/policies/BoostedLiquidity/BLVaultManagerLido.sol#L480-L483
Tool used
Manual Review
Recommendation
Use similar restrictions as in mintOhmToVault() for setLimit or lower circulatingOhmBurned when minting new OHM.
Discussion
0xLienid
Same issue as #018
0xLienid
Fix Implementation: https://github.com/0xLienid/sherlock-olympus/pull/2/files
Discussion
0xLienid
Same issue as #018
0xLienid
Fix Implementation: https://github.com/0xLienid/sherlock-olympus/pull/2/files
IAm0x52
Fix looks good. setLimit now properly accounts for circulatingOhmBurned
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the setLimit function does not incorporate circulatingOhmBurned into its validation, while mintOhmToVault does, creating a mismatch that allows minting up to the burned amount regardless of the limit.
Impact
The admin cannot effectively limit the manager's minting ability, as the vault can always mint at least the amount of burned OHM.
What the attacker needed
Admin sets a limit; circulatingOhmBurned is high
The fix
The setLimit function was fixed to properly account for circulatingOhmBurned, as confirmed by the judge.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This is a smart contract issue where an admin tries to set a limit on how many new tokens a manager can create. Because a separate number (tokens burned) keeps growing and is not considered when setting the limit, the admin's limit becomes ineffective, letting the manager create more tokens than intended.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.