RToken unnecessarily casts transfer amounts to uint128, causing silent fund loss when amounts exceed uint128.max.
If user deposit more than type(uint128).max
(340282366920938463463374607431768211455) the value will overflow and he will loose amount - uint128.max
The transformation to uint128 is useless as _mint()
can be called with uint256
If a user holds a large portion of tokens and decide to deposit it into the protocol, amount - uint128.max
will be locked forever in RToken as it will not mint enough RToken to retrieve the crvUSD token deposited.
Do not cast the value into uint128 as it's useless.
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.