LogoLogo
  • ZilSwap
  • How To
    • ๐Ÿ”Swap Tokens
    • โšกProvide Liquidity
      • ๐ŸšจPotential Risk: Impermanent Loss
    • ๐ŸŽClaim Rewards
    • ๐Ÿ”ฉOnboard the Reward Distributor (NEW)
    • ๐Ÿ”ฅParticipate in ZILO
    • ๐Ÿช™List Token
    • ๐Ÿ“„Privacy Policy
  • Roadmap
    • ๐Ÿ’ŽZilSwap V2.0
    • ๐ŸŽ2021 Overview
  • ZILBRIDGE
    • ๐ŸŒ‰ZilBridge
    • ๐ŸบERC-20 $ZIL Token Swap Support
    • ๐Ÿช™Token Registration
    • ๐ŸงชBeta Testing: Explore, evaluate, & be rewarded! [Ended]
    • ๐ŸŽ2021 Overview
  • ZILO
    • ๐Ÿš€ ZILO Projects
      • ๐Ÿ‡ZILO #7 MetaSportZ City (MSZC)
      • ๐ŸผZILO #6 EnviZion (EVZ)
      • ๐Ÿ“ˆZILO #5 ZilWatch (ZWT)
      • ๐ŸŽฒZILO #4: ZilChill (PLAY)
      • ๐Ÿ‘ฟZILO #3: DeMons (DMZ)
      • ๐ŸŽฎZILO #2: ZilliqaRoyale (BLOX)
      • ๐Ÿ”ขZILO #1 : ZilStream (STREAM)
    • ๐Ÿ“ƒApply to ZILO
  • ARKY
    • ๐ŸšขARKY
    • ๐Ÿ–ผ๏ธMinting NFTs
    • ๐Ÿ’ฐFees
    • โš ๏ธReporting Collections
    • ๐ŸŸขTerms of Use
  • Zolar & TBM
    • โ˜„๏ธZOLAR
    • ๐ŸผExclusive Perks on ARKY
    • ๐ŸปThe Bear Market Archives
      • ๐ŸปIntroduction
      • ๐Ÿ“Berry Bears Mini-Game
      • ๐ŸจTBM Attribute Generation
  • ZWAP Token
    • Introduction
    • Distribution
    • Usage
    • Governance
      • Portals
      • Proposal Types
      • Who can vote?
      • How to vote?
    • Token Contract
  • More
    • Brand Assets
    • Help
      • Using ZilPay on ZilSwap
      • General FAQs
    • Follow Us
Powered by GitBook
On this page

Was this helpful?

  1. How To

Onboard the Reward Distributor (NEW)

For project owners

PreviousClaim RewardsNextParticipate in ZILO

Last updated 3 years ago

Was this helpful?

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 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)

For minting: Refer to ZWAP's distributor for tokens

For transfers: Refer to STREAM's distributor

You will need to add the above distribution details to the following file:

You may use this template as a reference when raising your PR:

The following is a sample script available through which this weekly process can be automated:

๐Ÿ”ฉ
https://github.com/Switcheo/zwap-token/blob/master/contracts/v2/ZWAPDistributor.scilla
https://github.com/ZilStream/stream-token/blob/main/contracts/STREAMDistributor.scilla
https://github.com/Switcheo/zap-api/blob/master/config/config.yml
https://github.com/Switcheo/zap-api/blob/master/.github/distributor/pr-template.md
https://github.com/Switcheo/zwap-token/blob/master/scripts/distribute.js
Pool Overview