31541 - [SC - Critical] FluxTokens unlimited mint and Exploitation of g...
Submitted on May 21st 2024 at 04:17:49 UTC by @cryptoticky for Boost | Alchemix
Report ID: #31541
Report type: Smart Contract
Report severity: Critical
Target: https://github.com/alchemix-finance/alchemix-v2-dao/blob/main/src/FluxToken.sol
Impacts:
Theft of unclaimed yield
Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield
Manipulation of governance voting result deviating from voted outcome and resulting in a direct change from intended effect of original results
Description
Brief/Intro
FluxToken's unlimited mint and Exploitation of gauge voting results using it
Vulnerability Details
The Poke function can be executed several times within an epoch.
The poke function calls Voter._vote function and _vote function calls
IFluxToken(FLUX).accrueFlux(_tokenId).
FluxToken.accrueFlux
This function does not check for multiple calls within one epoch.
Impact Details
1. mint a substantial quantity of flux tokens
As soon as a user calls the poke function, the value of unclaimedFlux increases. Consequently, an attacker can obtain an unlimited amount of flux tokens. The attackers can wait until their locked bpt expires and then withdraw, enabling them to mint a substantial quantity of flux tokens.
Alternatively, they can withdraw before expiration. In this case, the profits gained by the attacker far outweigh any applicable penalties.
2. Secure the majority of the reward tokens
Simultaneously, the attacker can use the acquired flux tokens to obtain a significant voting boost. As a result, the attacker can secure the majority of the reward tokens.
Recommendation
According to the epoch, it is necessary to modify the acrueFlux function so that users can receive flux for each epoch.
Proof of Concept
Last updated
Was this helpful?