Substraction without prior checking
In _redeem_collateral
:
self.user_to_token_address_to_amount_deposited[_from][ token_collateral_address ] -= amount_collateral
If amount_collateral
exceeds the user’s balance, an underflow occurs.
Failing to validate subtractions can lead to underflows, allowing users to redeem more collateral than they deposited or burn more DSC than they minted.
N/A
assert self.user_to_token_address_to_amount_deposited[_from][token_collateral_address] >= amount_collateral, "Insufficient collateral balance"
This ensures the user has enough collateral in their balance before proceeding with the subtraction.
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.