๐ฉOnboard the Reward Distributor (NEW)
For project owners
Last updated
For project owners
Last updated
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.
There are two samples depending on your preferred distribution method โ minting or transfers.
For minting: Refer to ZWAP's distributor for tokens https://github.com/Switcheo/zwap-token/blob/master/contracts/v2/ZWAPDistributor.scilla
For transfers: Refer to STREAM's distributor https://github.com/ZilStream/stream-token/blob/main/contracts/STREAMDistributor.scilla
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.
You will need to add the above distribution details to the following file: https://github.com/Switcheo/zap-api/blob/master/config/config.yml
You may use this template as a reference when raising your PR: https://github.com/Switcheo/zap-api/blob/master/.github/distributor/pr-template.md
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