From 6d73358f0a73f55036668ccc2f6842ddf02467e2 Mon Sep 17 00:00:00 2001 From: Uncle Fatso Date: Mon, 12 Oct 2026 13:07:20 +0300 Subject: [PATCH] https://ghostforum.org/t/h3-staking-recall-bounty-leg-burns-stakers-pooled-ftso-staker-insolvency-bridge-out-dos/121 Signed-off-by: Uncle Fatso --- src/Gatekeeper.sol | 2 +- test/gatekeeper/GatekeeperRecall.t.sol | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Gatekeeper.sol b/src/Gatekeeper.sol index b623685..ad9aff6 100644 --- a/src/Gatekeeper.sol +++ b/src/Gatekeeper.sol @@ -174,7 +174,7 @@ contract Gatekeeper is IGatekeeper, Weaver, ReentrancyGuard { uint256 receiverAmount = amount - bountyAmount; StorageHistory(storageHistory).trySetTransactionExecuted(exodusSession); - IStorageHistory(storageHistory).tryIncreaseBridgeOut(receiverAmount); + IStorageHistory(storageHistory).tryIncreaseBridgeOut(amount); IStaking(staking).recall(payload.receiver, receiverAmount); if (bountyAmount > 0) { diff --git a/test/gatekeeper/GatekeeperRecall.t.sol b/test/gatekeeper/GatekeeperRecall.t.sol index 3c1dbad..e434b98 100644 --- a/test/gatekeeper/GatekeeperRecall.t.sol +++ b/test/gatekeeper/GatekeeperRecall.t.sol @@ -203,6 +203,7 @@ contract GatekeeperRecallTest is Test { expectedEthRefund = expectedEthRefund * 1e18 / 1e9; assertApproxEqAbs(actualReceiver.balance, receiverEthBefore + expectedEthRefund, 1); + assertEq(ghostedSupplyBefore - actualAmount, staking.ghostedSupply()); } { @@ -219,11 +220,5 @@ contract GatekeeperRecallTest is Test { treasury.auditReserves(); assertApproxEqAbs(treasury.totalReserves() * 1e18 / ftso.totalSupply(), backingRatioBefore - expectedDelta, 2000); } - - { - uint256 receiverGhstAfter = ghst.balanceOf(actualReceiver); - uint256 receiverImbalance = receiverGhstAfter - receiverGhstBefore; - assertEq(ghostedSupplyBefore - receiverImbalance, staking.ghostedSupply()); - } } }