Skip to content

Commit

Permalink
Change order in free to match reversed one from lock
Browse files Browse the repository at this point in the history
  • Loading branch information
sunbreak1211 committed Dec 8, 2023
1 parent 2527ae7 commit 4464593
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LockstakeEngine.sol
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,16 @@ contract LockstakeEngine {

function free(address urn, address to, uint256 wad) external urnOwner(urn) {
require(wad <= uint256(type(int256).max), "LockstakeEngine/wad-overflow");
stkGov.burn(urn, wad);
vat.frob(ilk, urn, urn, address(0), -int256(wad), 0);
vat.slip(ilk, urn, -int256(wad));
stkGov.burn(urn, wad);
address delegate_ = urnDelegates[urn];
if (delegate_ != address(0)) {
DelegateLike(delegate_).free(wad);
}
uint256 burn = wad * fee / WAD;
gov.burn(address(this), burn);
gov.transfer(to, wad - burn);
gov.burn(address(this), burn);
emit Free(urn, to, wad, burn);
}

Expand Down

0 comments on commit 4464593

Please sign in to comment.