Checking possible results of the attacker's execution of proposal 21.
Go to file
2023-05-23 00:10:28 +03:00
.vscode Init 2023-05-23 00:00:06 +03:00
lib Init 2023-05-23 00:00:06 +03:00
src Remove unused Mock contract 2023-05-23 00:10:28 +03:00
test Remove unused Mock contract 2023-05-23 00:10:28 +03:00
.gitattributes Init 2023-05-23 00:00:06 +03:00
.gitignore Init 2023-05-23 00:00:06 +03:00
.gitmodules Init 2023-05-23 00:00:06 +03:00
foundry.toml Init 2023-05-23 00:00:06 +03:00
package.json Init 2023-05-23 00:00:06 +03:00
README.md Init 2023-05-23 00:00:06 +03:00
remappings.txt Init 2023-05-23 00:00:06 +03:00

Requirements

Installation

git clone --recurse-submodules https://git.tornado.ws/Theo/proposal-21-test.git

Testing

npm run test

Test logic

Hacker added 1 200 000 TORN tokens to staking directly, 10 000 to 100 accounts and 200 000 to one account. He then withdrew 483,000 TORN from the Governance Vault, however, 717,000 remained.

We need to check, that:

  1. All attacker staked TORNs after proposal 21 will be nullified;
  2. Governance Vault will be replenished from Governance for 483 000 TORN - the entire amount that he withdrew, to set the ratio of funds locked in staking contract to real tokens in Vault 1: 1

If all tests passed, all good.