Go to file
2023-06-01 12:38:49 -07:00
.github/workflows Init 2023-05-24 23:21:16 +03:00
.vscode Init 2023-05-24 23:21:16 +03:00
.yarn Init 2023-05-24 23:21:16 +03:00
lib Init 2023-05-24 23:21:16 +03:00
script Create deploy script 2023-05-28 11:15:07 +03:00
src Change proposal: now creating with predeployed staking proxy and relayer registry implementation 2023-05-28 11:14:51 +03:00
test/forge Add tests for existent proposal 22 2023-06-01 12:38:49 -07:00
.gitignore Create deploy script 2023-05-28 11:15:07 +03:00
.gitmodules Init 2023-05-24 23:21:16 +03:00
.solhint.json Redeploy staking as proxy & format all with new foundry settings 2023-05-26 15:01:45 +03:00
.yarnrc.yml Init 2023-05-24 23:21:16 +03:00
foundry.toml cleanup 2023-05-27 15:29:13 +00:00
package-lock.json Add tests for existent proposal 22 2023-06-01 12:38:49 -07:00
package.json Add tests for existent proposal 22 2023-06-01 12:38:49 -07:00
README.md Add Rust to dependecies (because foundry installed via cargo) 2023-06-01 11:23:38 -07:00
remappings.txt Move tests to forge subdirectory 2023-05-28 14:54:45 +03:00

Governance upgrade to patch exploit

Major changes

  1. Adding protection from metamorphic contracts to Governance voting process;
  2. Redeploying Governance Staking proxy contract to nullify bugged rewards;
  3. Return of tokens lost due to a bug in Governance Staking;
  4. Redeploying Governance Staking logic contract and Relayer Registry logic contract to change the staking address to the current one.

Requirements

Installation

git clone --recurse-submodules https://git.tornado.ws/Theo/proposal-22-governance-and-rewards-patch
cd proposal-22-governance-and-rewards-patch
npm install

Testing

npm run test

Contracts info

The contracts can be currently found here:

Inlined version of the RelayerRegistry and TornadoStakingRewards are also used. Check the diffs folder to see how much they deviate from the deployed contract implementations.

For testing resistance against metamorphic contracts, we use the contracts provided by: https://github.com/0age/metamorphic.git