From d8eee5b2b0ff3419bc8987a29fbe31787311584b Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Sat, 27 May 2023 13:14:05 +0000 Subject: [PATCH] Compensate staking due to imbalances Signed-off-by: AlienTornadosaurusHex <> --- contracts/v4-patch/PatchProposal.sol | 3 +++ test/patch/patch.test.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/contracts/v4-patch/PatchProposal.sol b/contracts/v4-patch/PatchProposal.sol index 75708a4..db063e4 100644 --- a/contracts/v4-patch/PatchProposal.sol +++ b/contracts/v4-patch/PatchProposal.sol @@ -72,5 +72,8 @@ contract PatchProposal { LoopbackProxy(governanceProxyAddress).upgradeTo( address(new GovernancePatchUpgrade(address(newStaking), gasCompensationVaultAddress, userVaultAddress)) ); + + // Transfer TORN in compensation to the staking proxy + TORN.transfer(address(newStaking), 94_092 ether); } } diff --git a/test/patch/patch.test.js b/test/patch/patch.test.js index 724a8a9..a0fb8f8 100644 --- a/test/patch/patch.test.js +++ b/test/patch/patch.test.js @@ -214,6 +214,8 @@ describe('Gov Exploit Patch Upgrade Tests', () => { await governance.execute(proposalId) + expect(await torn.balanceOf(await governance.Staking())).to.equal(pE('94092')) + const newVaultAddr = await governance.userVault() const newGasCompAddr = await governance.gasCompensationVault() const newStaking = await governance.Staking()