diff --git a/lib/solady b/lib/solady index 2b69b66..3d57528 160000 --- a/lib/solady +++ b/lib/solady @@ -1 +1 @@ -Subproject commit 2b69b665decfbd23ac1fb0f028588e8e76ef4059 +Subproject commit 3d57528984275d1746ee6597acd36277f51c091d diff --git a/src/Unwind.sol b/src/Unwind.sol index 12cf117..1ded60e 100644 --- a/src/Unwind.sol +++ b/src/Unwind.sol @@ -124,6 +124,10 @@ contract Unwind is IFlashLoanRecipient, IFlashLoanSimpleReceiver { // swap the collateral for debt token uint totalRepay = _flashBorrowedAmount + _flashBorrowFee; ERC20(_collToken).safeApprove(_swapper, _collToWithdraw); + // VERY open. Make sure you don't leave any pending token approvals + // credit delegations or tokens on this contract. + // Revoke after use or approve only required amounts that will + // exhaust all of the approved amount. (bool success, ) = _swapper.call(_swapData); if (ERC20(_debtToken).balanceOf(address(this)) < totalRepay) revert InsufficientOutput(