In RToken.sol contract Because of wrong function call order of ResevePool User will lost full asset. Because in burn function this line if (receiverOfUnderlying = address(this)) revert InvalidAddress();is missing.
In RToken.sol contract in burn function read below comments...
Above on line no 25 >> if (receiverOfUnderlying != address(this)) that is true then it's ok
if that condition is False then Underlying Asset will stay on this contract.
That Can be recoverable by rescueToken function .
There also have another function transferAccruedDustthat is basically tranfer all remaining asset from this (RToken.sol) contract to another address.
Carefully Read this ---
Now Assume that if (receiverOfUnderlying != address(this))conditon is false.
Then According logic Aseet will stay on this contract(RToken.sol).
Condition 1:-
If Reservepool First call rescueTokento tranfer asset from this contract to reciever address[who burn token but don't receive asset].
Then call transferAccruedDustfunction
In this condition all are working well.
Condition 2:-
If Reservepool call transferAccruedDust function before rescueTokenthen then contract asset will be zero.
In this condition User[who burn token but don't receive asset] will loss all his asset. That cannot be recovered.
Because that Can not be recoverable from that contract again.
In this condition User Loss their Asset.
User can lose full Asset if there is single mistake on function call order.
Manual review
In RToken.sol contract in burn function . Add line no 11 to avoid this. And this also save your Gas cost. If line 11 is implement then there will no need of rescueTokenfunction.
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.