As currently designed, transfer
and transferfrom
functions are not overridden and exposed normally in DebtToken contract.
On the other hand, _update
function has been overridden as follows:
The check added makes sure no transfer from a non zero address to a non zero address is possible. The purpose of this check is to make sure debt tokens are non-transferrable.
Users should not be allowed to transfer such tokens, neither should be to burn them. Only the lending pool should be able to burn debt tokens when repaying debt.
Nevertheless, any user is still able to call transfer
function, sending its own debt token to the 0 address. This is equivalent to burning and should not be allowed.
The problem arises because any user could accidentally, or because of a scam, burn his own debt token, making it impossible to repay debt because attempts to burn debt token will fail.
The impact of this vulnerability is high, given that allowing direct burning of debt tokens can lead to impossibility to repay debt and collateral stuck, with potentially collateral liquidated if house price stays stable once debt has increased enough.
Manual review.
One potential fix for this issue would be to modify the _update
function to make sure burning is only allowed when the caller is the lending pool:
Another solution (AAVE approach) would be to override all ERC20 functions needed (transfer, transferFrom, approve etc) and make them revert by default.
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.