Function: withdrawFromSP(uint256 _amount)
Withdraw tokens from the stability pool.
Inputs
_amount
Control: Fully controlled.
Constraints: No constraints.
Impact: The amount of debt tokens to withdraw.
Branches and code coverage (including function calls)
Intended branches
Withdraw debt tokens from the stability pool, trigger Prisma reward issuance, and accrue deposit collateral gains and rewards tokens.
Updates the deposits and snapshots.
Function call analysis
debtToken.returnFromPool(address(this), msg.sender, debtToWithdraw)
What is controllable?
msg.sender
anddebtToWithdraw
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.