Lucene search

K
code423n4Code4renaCODE423N4:2023-10-ETHENA-FINDINGS-ISSUES-721
HistoryOct 30, 2023 - 12:00 a.m.

stakers can withraw reward without waiting the vesting period

2023-10-3000:00:00
Code4rena
github.com
3
stakers
vesting period
reward distribution
frontrun
mitigation

7.1 High

AI Score

Confidence

Low

Lines of code

Vulnerability details

Impact

stakers can frontrun a reward giving transaction by monitoring the mempool for the function transferInRewards, and stake before it, and then unstake after to get rewards, if the cooldown is off.

Proof of Concept

imagine a scenario where the cooldown period is off and the REWARDER_ROLE wants to distribute rewards on USDe stakers.

Bob an attacker , views the transaction on the mempool and frontruns it with a deposit call.

  • the REWARDER_ROLE deposits 100Usde as reward
  • Bob frontruns it with staking 5% of the already staked amount of USDe
  • after the call Bob can withdraw to get what he deposited plus 5% of the 100USDe as a reward without waiting for the veting period.

Tools Used

vscode

Recommended Mitigation Steps

do not transfer the reward USDe to the staking contract, until the vesting period for it is expired.

Assessed type

ERC4626


The text was updated successfully, but these errors were encountered:

All reactions

7.1 High

AI Score

Confidence

Low