/merkle-airdrop

An experiment of merkle airdrop on Tezos

Primary LanguagePHPMIT LicenseMIT

Merkle Airdrop

What is this?

Complete airdrop solution for Tezos tokens.

The chosen solution uses merkle trees. The advantages are of 2 kinds:

  • It is cheap because fees will be paid by the claimers.
  • It brings engagement, requiring some action from the claimers.

Status is experimental / side-project.

If you are looking for real airdrops, take a look at organicgrowth.wtf (on etherlink)

How it works?

An airdrop project consists in off-chain and on-chain data:

  • on-chain, there is a smart-contract that holds projects information, e.g: the token contract address, the hex of a merkle root of beneficiaries (address, amount), and the registry of already claimed beneficiaries entries.
  • off-chain, the merkle tree must be stored to be able to generate the merkle proofs required to claim. An off-chain app also is helping on the merkle tree generation and validation before deploying the airdrop contract.

Prerequisites

  • taqueria is used for the contracts stack
  • PHP8 is used for the dApp
  • docker for infra (MySQL, adminer, flextesa..)

Why PHP?

  • it is still the king of cheap hosting.
  • it has great retro-compatibilty
  • it is evolving, there is a PHP fundation now, and everything is discussed openly.
  • it still runs an important part of the web, and we want to make decentralized apps, so why not using a popular language for this.

Dev

  1. Install dependencies: make install
  2. Launch infra: make up (Stop it: make down)
  3. Compile contracts: make compile
  4. Deploy contracts: make deploy
  5. Start app: make start

Then, you'll have :

Dapp

Use flextesa's bob or alice for dev purpose, you can also add choosen deterministic keys in the testdata script.

Otherwise, you can add your address in same script.

The Dapp will check for the address existence in the Identifier.

Resources