You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
depositLPForMember() and bond() invokes harvest() if a user has existing LP deposits or bonded assets into the DAO. This is to prevent users from depositing more assets before calling harvest() to earn more DAOVault incentives. However, harvest() reverts if reserve emissions are turned off.
Hence, deposits / bonds performed by existing users will fail should reserve emissions be disabled.
Recommended Mitigation Steps
Cache claimable rewards into a separate mapping when depositLPForMember() and bond() are called. harvest() will then attempt to claim these cached + pending rewards. Perhaps Synthetix's Staking Rewards contract or Sushiswap's FairLaunch contract can provide some inspiration.
The text was updated successfully, but these errors were encountered:
Handle
hickuphh3
Vulnerability details
Impact
depositLPForMember()
andbond()
invokesharvest()
if a user has existing LP deposits or bonded assets into the DAO. This is to prevent users from depositing more assets before callingharvest()
to earn more DAOVault incentives. However,harvest()
reverts if reserve emissions are turned off.Hence, deposits / bonds performed by existing users will fail should reserve emissions be disabled.
Recommended Mitigation Steps
Cache claimable rewards into a separate mapping when
depositLPForMember()
andbond()
are called.harvest()
will then attempt to claim these cached + pending rewards. Perhaps Synthetix's Staking Rewards contract or Sushiswap's FairLaunch contract can provide some inspiration.The text was updated successfully, but these errors were encountered: