The additionalCapacity function may have overflow in some cases. e.g: 3x Neutral ETH-USDC with weight of ETH being 55%, USDC 45%
Consider the following scenario:
E.g: 3x Neutral ETH-USDC with weight of ETH being 80%, USDC 20%
A $1 equity deposit should result in a $2 borrow for a total of $3 assets
Amount of ETH to borrow would be $3 x 80% = $2.4 worth of ETH
Amount of USDC to borrow would be $3 (asset) - $2.4 (ETH borrowed) - 0.4
Obviously there is an overflow in the calculation of _maxTokenBLending.This affects the user deposit. and does not generate the correct error message.
This affects the user deposit. and does not generate the correct error message.
manual
It is recommended to take into account overflow cases and modify them accordingly, e.g. by throwing correct error warnings after an overflow.
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.