The staking implementation used is not based on Sushiswap MasterChef and Synthetix. The problem with Zaros staking algorithm, is it did not consider the staking duration and precedence, this causes unfair staking rewards to be provided.
The Zaros staking system operates by checking the last change whenever the market distributes rewards. If there is a difference in rewards being distributed, the vault allocates them to users. However, a critical flaw in this system is that it allows any user to stake a large amount right before rewards are distributed, claim the majority of the rewards, and then immediately unstake. This effectively enables them to steal rewards from other users who have been staking for longer, as there is no minimum staking period to prevent such behavior.
The proof of concept further demonstrates that users’ shares remain unchanged unless rewards are distributed. More importantly, it highlights how users can exploit the system by staking a large amount, capturing most of the rewards, and unstaking immediately, which undermines fairness and disincentivizes long-term staking.
Add to 2025-01-zaros-part-2/test/Base.t.sol
Add to 2025-01-zaros-part-2/script/vaults/Vaults.sol
Add to 2025-01-zaros-part-2/test/integration/market-making/vault-router-branch/stake/stake.t.sol
Unfair rewards distributed to users,
Foundry
Use masterchef staking algorithm and impose a minimum staking period.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.