# Onboard the Reward Distributor (NEW)

{% hint style="info" %}
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](https://zilswap.io/pools/overview) page.
{% endhint %}

![](/files/hM1NKB4hn99Xus03GJIR)

### Onboarding Steps (For Project Owners)

#### **Step 1: Deploy a distributor smart contract**&#x20;

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>

#### **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.

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

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

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:&#x20;

* **Epoch**: `0`&#x20;
* **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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zilswap.io/how-to/reward-distributor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
