Phala-Network / prelaunch-token

The PHA ERC20 Prelaunch Token
prelaunch-token.phala-network.vercel.app
13 stars 12 forks source link

Merkle airdrop #6

Open h4x3rotab opened 4 years ago

h4x3rotab commented 4 years ago

ETH gas price has already skyrocketed. We need a better way to reduce the costs for airdrop.

"Merkle Airdrop" is a solution. We ask the users to claim instead of sending the rewards. It's unnecessary to store the reward list on-chain at all. We can just keep a merkle root of the list so that publishing an airdrop is O(1), and validate the merkle inclusion proof each time a user claims the reward.

There are reference implementations. This one has both frontend and contract, but it's based on Aragon. We should make the following changes:

  1. Standalone smart contract & dapp by removing Aragon related stuff
  2. O(1) airdrop; work with existing ERC20 token
  3. Send token to users by transferFrom instead of minting new token or transfer from its own account
  4. Allow users to batch claim all his funds on UI
  5. Minimize the contract size
gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 500.0 USDT (500.0 USD @ $1.0/USDT) attached to this issue has been cancelled by the bounty submitter

h4x3rotab commented 4 years ago

Done. Launched at: https://award.phala.network