Function: vaultBurnDebtTokenCallback(uint256 amount)
This function is used to burn debt tokens for a smart vault. It is expected to be called from the smart vault during _burnDebtToken.
Inputs
amountControl: Not controllable, calculated in the contract.
Constraints: Amount is not zero (validated in the
_burnDebtToken).Impact: Amount of debt token to burn.
Branches and code coverage
Intended branches
Check if the caller is the smart vault.
Call
burnon the debt token.
Negative behavior
Revert if the caller is not the smart vault.
Revert if the debt-token burning fails.
Function call analysis
this.debtToken.burn(msg.sender, amount)What is controllable? Nothing.
If the return value is controllable, how is it used and how can it go wrong? It is safe because
_burnDebtToken, which callsvaultBurnDebtTokenCallback, performs a balance check after burning.What happens if it reverts, reenters or does other unusual control flow? A revert indicates a failure in the burn process, and since the
debtTokenis expected to be an ERC-20 address, there is no reentrancy risk.