Minting is completely impossible due to wrongful forking of convex #97
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
duplicate
This issue or pull request already exists
G (Gas Optimization)
Lines of code
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/Aura.sol#L101
Vulnerability details
Impact
Minting through the
mint
function of the Aura token is impossible due to a wrongful fork of the Cvx token. This would require a complete redeployment to revive functionality to the Aura token'smint
function.During each mint, the following calculation is made:
However, initially,
totalSupply()
is either just the_amount
parameter from the initializer, which is likely way lower thanEMISSIONS_MAX_SUPPLY
. This causes the aforementioned line of code on line 101 to underflow with almost a guarantee and will cause all dependencies on themint
function (which we assume are a lot) to not function.Proof of Concept
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/Aura.sol#L101
To reproduce the issue: It suffices to deploy Aura and initialize it. Any call to mint will than underflow due to the arithmetic on line 101.
Tools Used
Manual analysis.
Recommended Mitigation Steps
Consider reverting to the original Convex token code for the
mint
function.The text was updated successfully, but these errors were encountered: