ERC-20 tokens have varying decimal places (e.g., USDC = 6 decimals, DAI = 18 decimals). However, the _totalValue
variable updates deposits and withdrawals without normalizing for different token decimal places, assuming all tokens have the same scale.
The protocol misrepresents the actual total deposited value, leading to incorrect accounting of funds and resulting
misleading output in
Manual review
Normalize token values based on decimals
Use ERC-20’s decimals()
function to convert all token values to a standard scale (e.g., 18 decimals) before updating _totalValue
:
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.