๐Ÿ”ฉOnboard the Reward Distributor (NEW)

For project owners

This guide is for project owners looking to distribute their liquidity rewards via the ZilSwap reward distributor. Upon successful onboarding, rewards will be displayed on ZilSwap's Pool Overview page.

Onboarding Steps (For Project Owners)

Step 1: Deploy a distributor smart contract

There are two samples depending on your preferred distribution method โ€” minting or transfers.

Step 2: Raise a PR to add the distributor to ZilSwap's backend

You will need to set things such as the amount of tokens to be distributed, token details, and the distributor you've deployed in step 1.

Step 3 [Weekly Task]: Set the merkle root for the newly generated epoch on the distributor contract you've deployed in step 1

After ZilSwap creates the distribution for that week's epoch, a merkle tree will be generated of which the root needs to be set on the deployed distributor contract which will enable that week's claims.

  • You may reach your distribution by going to: https://stats.zilswap.org/distribution/data/{distributor_address}/{epoch}

The last hash in the series of proofs for each wallet address in that distribution is the merkle root, which you'll see is the same for each wallet. With that you can set the merkle root on the distributor with the following values:

  • Epoch: 0

  • Merkle root: 0xthemerklerootretrievesfromthedistributionendpoint (note: 0x has been added in front of the root)

The following is a sample script available through which this weekly process can be automated: https://github.com/Switcheo/zwap-token/blob/master/scripts/distribute.js

Last updated