Skip to content

banteg/your-eminence

Repository files navigation

Your Eminence

Abstract

This is a working repo for distributing 8 million DAI sent back by Eminence hacker.

Background

After people put over 15 million DAI in Eminence bonding curve, someone exploited it to drain the funds. There were three transactions (1, 2, 3) draining 15,015,533 DAI in total. Shortly after, the attacker sent 8,000,000 DAI to Andre, who then sent them to the yearn multisig and tasked it with distributing the funds.

Distribution details

Eminence deployment has consisted of six tokens, each one on a bonding curve:

  • EMN 0x5ade7ae8660293f2ebfcefaba91d141d72d221e8, curve with DAI
  • eCRV 0xb387e90367f1e621e656900ed2a762dc7d71da8c, curve with EMN
  • eLINK 0xe4ffd682380c571a6a07dd8f20b402412e02830e, curve with EMN
  • eAAVE 0xc08f38f43adb64d16fe9f9efcc2949d9eddec198, curve with EMN
  • eYFI 0xed35197cadf01fcbfe6cfc11081f299cffb095bf, curve with EMN
  • eSNX 0xd77c2ab1cd0faa4b79e16a0e7472cb222a9ee175, curve with EMN

To covert to DAI we use calculateContinuousBurnReturn functions which returns output of burning tokens. Since everyone starts from the same point on the curve and the burns don't move the point, the total amount used in calculation would be larger than the actually bonded amount.

To calculate the DAI value of EMN-bonded e-tokens, we just repeat the process twice, burn to EMN, then burn to DAI.

The snapshot block is chosen to be 10954410, one block before the first drain transaction.

Usage

MerkleDistributor has been deployed to mainnet at 0x5e37996bcfF8C169e77b00D7b6e7261bbC60761e

To claim the distribution:

brownie accounts import alias keystore.json
brownie run snapshot claim --network mainnet

Or claim using youreminence.finance.

All testing is performed in a forked mainnet environment.

To run the unit tests:

brownie test

To generate the snapshot data:

pip install -r requirements.txt

brownie networks add Ethereum archive host=$YOUR_ARCHIVE_NODE chainid=1

rm -rf snapshot
brownie run snapshot --network archive

To validate the snapshot with an end-to-end test distribution:

brownie run distribution

To deploy the distributor on the mainnet:

brownie run snapshot deploy --network mainnet

Tips

The return of funds to you was made possible by a team of volunteers who worked for free to make this happen. Please consider tipping them a portion of your recovered funds as a way to say thank you.

About

distribution scripts for eminence compensation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published