User is always in debt until and unless he/she gains extra euros than borrowed from any means.
User can not repay back all there loans and will always be in debt until they get the extra euros from any other means like by staking,buying or by anyother means. The protocol uses the burn function as the method of repaying and freeing the asset. When the user wants to clear all his/her loan he will not be able to do that due to wrong logic in the burn function.
When user is trying to repay small amounts then it might not create the problem but when user tries to repay all his/her debt the function will always revert and he/she cannot repay back.In the burn function at first the amount specified is burnt and then the fee is transferred to the protocol. Due to this logic when user tries to pay all the debt there will not be any euros left for the fee. So, instead what should be done is fee should be deducted and transferred first from the amount and then burn the remaining amount.
Here only up to 99.5 can be burned, more than that can not be burned
User will always be in debt until he/she has extra euros than burrowed by locking the asset.
Manual Review
Change the logic in the burn function.
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.