51 lines
1.3 KiB
Markdown
51 lines
1.3 KiB
Markdown
# Proposal to compensate relayer attack losses
|
|
|
|
### Changes
|
|
|
|
- Transfer about 987 TORN from Governance to affected relayers
|
|
|
|
### Requirements
|
|
|
|
- Rust ([Need only for Windows](https://doc.rust-lang.org/cargo/getting-started/installation.html))
|
|
- Foundryup ([Windows](https://github.com/altugbakan/foundryup-windows), [Linux](https://book.getfoundry.sh/getting-started/installation))
|
|
- Node 18 or higher ([Windows](https://github.com/coreybutler/nvm-windows), [Linux](https://github.com/nvm-sh/nvm))
|
|
|
|
### Installation
|
|
|
|
```text
|
|
git clone --recurse-submodules https://git.tornado.ws/Theo/proposal-33-compensate-relayer-losses
|
|
cd proposal-33-compensate-relayer-losses
|
|
npm install
|
|
```
|
|
|
|
### Testing
|
|
|
|
```text
|
|
npm run test:windows
|
|
```
|
|
|
|
or
|
|
|
|
```text
|
|
npm run test:linux
|
|
```
|
|
|
|
##### Test with gas
|
|
|
|
```text
|
|
npm run test:gas:windows
|
|
```
|
|
|
|
or
|
|
|
|
```text
|
|
npm run test:gas:linux
|
|
```
|
|
|
|
### Verification
|
|
|
|
Etherscan contract link: [0x6B3257A4642C214fFAD2925B96a20f3D76005cF4](https://etherscan.io/address/0x6b3257a4642c214ffad2925b96a20f3d76005cf4)
|
|
|
|
All relayer losses calculations can be found in file [calculateLosses.ts](scripts/calculateLosses.ts), anyone can rerun it via `yarn calculate`.
|
|
Result data with TORN compensation amount for each relayer is written to file [relayerLosses.txt](data/relayerLosses.txt).
|