User is always able to leave his position undercollateralised with the withdrawNFT
function. This due to the following check:
Imagine the following scenario:
Malicious user borrows assets from the rToken
contract. He borrows 100k with 120k worth of NFT assets
With the check that is listed above, a user will be able to drop collateral value to 80k, leading to bad debt for the protocol and possibility for the user to use the NFT in other position
This is extremely bad for the protocol as leaves loans with the collateral amount being just 80% of the debt value
This leads to undercollateralised positions and bad debt for the protocol
Manual review
instead do it like this:
This will force the users to be at the proper collateral level
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.