20,000 USDC
View results
Submission Details
Severity: high
Valid

Reward Token(WETH) deposit transaction can be front-run with a deposit of a large quantity of staking token(TKN) making the frontrunner eligible for a large share of claimable reward.

Summary

Reward Token(WETH) deposit transaction can be front-run with a deposit of a large quantity of staking token(TKN) making the frontrunner eligible for a large share of claimable reward.

Vulnerability Details

The staking contract will be refilled with the reward token(WETH) on a regular basis to maintain the reward cycle. The attacker can front-run this reward deposit transaction and deposit the large amount of TKN using the Staking.deposit(), This will make him eligible to claim a high reward from the contract in an unfair way.

Impact

The frontrunning bot can see the upcoming reward deposit in the mempool and can front-run the transaction by depositing a large amount of staking tokens, that way the attacker can earn a large portion of the reward making the reward system unfair.

Tools Used

manual review

Recommendations

The better way to write the staking contract would be to use Synthetix StakingRewards as an inspiration which does not have the frontrunning issues.

example
Inspiration

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.