Users Can Game sNOTE
Minting If Buybacks Occur Infrequently
#231
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Handle
leastwood
Vulnerability details
Impact
As there is no cooldown when minting
sNOTE
tokens, users can frontrun calls toTreasuryManager.investWETHToBuyNOTE
and receive rewards without having staked for the full duration prior. If these buybacks occur infrequently, it may be possible for aNOTE
holder to profit by staking before a call toinvestWETHToBuyNOTE
, waiting for the cooldown to pass before finally redeemingsNOTE
to be used in other protocols. This can be repeated again and again to extract additional yield from the protocol.Proof of Concept
https://github.com/code-423n4/2022-01-notional/blob/main/contracts/TreasuryManager.sol
Tools Used
Manual code review.
Recommended Mitigation Steps
Ensure buybacks occur frequently or consider adding a mechanism to delay deposits to further disincentivize staking gamification.
The text was updated successfully, but these errors were encountered: