31082 - [SC - Critical] Expired locks can be used to claim rewards

Submitted on May 12th 2024 at 12:32:07 UTC by @infosec_us_team for Boost | Alchemix

Report ID: #31082

Report type: Smart Contract

Report severity: Critical

Target: https://github.com/alchemix-finance/alchemix-v2-dao/blob/main/src/Voter.sol

Impacts:

  • Theft of unclaimed yield

Description

This report is so short because the bug is straightforward to explain and prove.

Vulnerability Details

Expired locks can keep claiming rewards for any bribe.

The fix requires checking that block.timestamp is larger than the lock's expiration date when claiming bribes using the claimBribes(...) function in the Voter smart contract.

The permanently fixed function is:

Impact

Stealing bribe rewards using expired tokens can lead to solvency issues.

Proof of Concept

This proof of concept can be added to src/test/Voting.t.sol. It demonstrates how a user can create a lock for a min. of 1 epoch, and keep claiming rewards forever (even after expired).

Last updated

Was this helpful?