# Introduction

<figure><img src="/files/l9HSFAiF4ZEOTa7pfzMC" alt=""><figcaption></figcaption></figure>

ShareMint makes it easy for you to launch an affiliate or referral marketing program for your web3 project. Reward your most loyal community members and promoters for the value they generate.

{% embed url="<https://www.loom.com/share/c127065f895d4fde8ff4cffa1e2169b6>" %}
ShareMint demo
{% endembed %}

## Overview

ShareMint is a web3 affiliate and referral marketing that covers all your needs when it comes to quickly setting up your own referral program. We also help you connect with a network of top partners including web3 communities, influencers, newsletters and publishers.

Whether you're a DeFi protocol, web3 game, NFT mint, or web3 SaaS ShareMint will help you launch your referral program in minutes.

We're here to help you grow and maximise the power of your community and external partners.

A strong referral and affiliate program is key to incentivising people to share your project. But web2 affiliate platforms don't cater to web3 needs. Web2 platforms don't understand wallet addresses, on-chain activity, or how to pay out affiliates in crypto. This is where ShareMint comes in to help.

We offer a vast array of features with deep levels of customisations to help you launch your referral program. ShareMint supports Ethereum, Polygon, Binance Smart Chain, Arbitrum, Optimism, Base, Solana and every EVM chain.

[Launch a web3 referral program on Ethereum](https://blog.sharemint.xyz/launch-web3-referral-program-on-ethereum)

[Launch a web3 affiliate program on Polygon](https://blog.sharemint.xyz/launch-web3-affiliate-program-on-polygon)

<figure><img src="/files/Q52gnoIRvw3sDrtBF9NN" alt=""><figcaption></figcaption></figure>

## Quick links

{% content-ref url="/pages/8tqmva8fgysgZcUky1oS" %}
[What we do](/overview/what-we-do)
{% endcontent-ref %}

{% content-ref url="/pages/1ytPAjLKKGa51Ej5foAE" %}
[Features](/overview/features)
{% endcontent-ref %}

## Get Started

We've put together some helpful guides for you to get setup with our product quickly and easily.

{% content-ref url="/pages/s0KSGkg8kaUMGWFNPqQG" %}
[Getting Started](/fundamentals/getting-started)
{% endcontent-ref %}

{% content-ref url="/pages/cpwTXrX7Y0i3g4Ycw6dq" %}
[Affiliate Sign Up Page](/fundamentals/affiliate-sign-up-page)
{% endcontent-ref %}

{% content-ref url="/pages/fj3TbMn2Td1pZm1aTKM8" %}
[Referee Sign Up Page](/fundamentals/referee-sign-up-page)
{% endcontent-ref %}

{% content-ref url="/pages/zSGBx0X1c9TfPpY3GNeE" %}
[Integrating ShareMint into your Website](/fundamentals/integrating-sharemint-into-your-website)
{% endcontent-ref %}

{% content-ref url="/pages/EHyithzvAv3KYtjRzbKr" %}
[Inviting other Admins](/fundamentals/inviting-other-admins)
{% endcontent-ref %}


# What we do

ShareMint makes it easy for web3 businesses to set up a referral or affiliate program. We also provide a web3 affiliate network.&#x20;

## For Brands

Launch your referral program in two minutes using ShareMint. Enjoy the benefits:

* **Incentivize your community** - turn your community into your best marketers. Reward community members when they share your product with their others, earning a percentage of the revenue they generate.
* **Attract external affiliates** - add your web3 affiliate program to ShareMint's affiliate marketplace to get exposure to our affiliate network. Web3 focused publishers are looking for opportunities to support quality projects and earn income while doing so.&#x20;
* **Target a focused audience** - offer higher affiliate rewards for affiliates that successfully refer a a web3 address with certain on-chain criteria. For example, a web3 gaming studio can offer bigger rewards for referring addresses that hold gaming related NFTs.

## For Publishers

Web3 publishers can monetize their audiences by sharing web3 projects. Publishers can find opportunities to work with web3 brands using ShareMint's affiliate marketplace. ShareMint works for all type of publishers:

* **Affiliate marketers** - affiliates can share ShareMint affiliate links to earn revenue for successful conversions.
* **Influencers** - influencers can share web3 projects they like with their followers and earn an income in the process.&#x20;
* **Web3 brands** - web3 brands are the new publishers. Web3 brands can become affiliates for other web3 businesses and share their affiliate link with their communities. The revenue generated from affiliate related purchases can be used as a revenue stream for the brand, or towards a community fund.

## Video Overview

Check out our one-minute video demo of the platform:

{% embed url="<https://www.loom.com/share/4ffc76cdf39a4faf9f7ee4949a14d3ac>" %}


# Features

## On-Chain Analytics

We make it easy for you and your affiliates to understand exactly who your users are. Easily understand their past on-chain activity.

<figure><img src="/files/Q52gnoIRvw3sDrtBF9NN" alt=""><figcaption></figcaption></figure>

## One-Click Payouts

When it's time to pay out your affiliates you can do so in the click of a button. We make it easy to keep track of exactly who you have and haven't paid.

<figure><img src="/files/91a2hOsNxZm0HnGKLV6E" alt=""><figcaption></figcaption></figure>

## NFT Allowlists

Run your allowlist via ShareMint or our HeyMint integration. Reward affiliates for inviting others to the allowlist and pay them on mint day.

## Token Gating

Token gate your affiliate program or offer higher rewards to token holders from specific communities.

## Affiliate Marketplace

Publish your project in our affiliate marketplace further boost your project via our affiliate network.

<figure><img src="/files/BL4Sq9HX68rSvseeqiQH" alt=""><figcaption></figcaption></figure>


# Partner Program

Details on the ShareMint partner program

ShareMint partners are a curated list of web3 projects, communities and content creators.

**How it works**

When an affiliate or referral campaign is launched on ShareMint, the owners are able to see the list of partners and invite those they would like to partner with to join as affiliates. When a partner is chosen, they will receive an email informing them about the partnership details. The partner can approve the invitation or reject it (either by clicking reject or ignoring it). When the invitation is approved, the partner becomes an affiliate. They get a unique referral url they can share with their community or followers.

The partner will earn the affiliate rewards set by the campaign owners for every purchase/mint that comes from their community. The revenue generated from these purchases can go to:

* The partner.
* A community fund, controlled by the community.
* Charity.

**Example scenario**

”Community” is a a big community of gamers, they are listed as partners.

”Game” is a new web3 game, launching a web3 referral program on ShareMint in order give their marketing a boost. Their mint price is 0.2 ETH and they set up the affiliate rewards to 10%.

* After creating a campaign, Game looks at the list of partners and believes Community is a good fit for partnership as Community’s gaming theme matches with the users Game is looking to acquire. Game sends Community an invitation to partner.
* Community receives an email about the offer. They decide Game is of high quality and that they would like to partner. Community approves the invitation.
* Community gets their referral url for Game’s upcoming mint.
* Community shares their referral url with their followers. Those that learn about Game’s mint from Community become referees, referred by Community.
* 50 mints come from Community’s followers, generating 50 \* 0.2 ETH = 10 ETH for Game.
* After the mint ends, Game pays all affiliates, generating 10 ETH \* 10% = 1 ETH for Community.

**The Benefits**

For projects launching a referral program - Partner with top names in the space and increase your reach by 100x.

For partners - Receive invitations to partner with top upcoming projects directly to your email. Utilize revenue sharing partnerships to earn extra revenue.

Soon, in addition to revenue sharing, more partnership types will be available for partners.

You can learn more about the ShareMint partners program [here](https://sharemint.xyz/partners).

Apply to become a partner [here](https://sharemint.xyz/partner/apply).


# Getting Started

Set up your referral program in minutes

Watch this video or follow the links below to get started:

{% embed url="<https://www.loom.com/share/55e5bc9aaeea49b19800693d6492323f>" %}
Creating a project on ShareMint
{% endembed %}

<details>

<summary>Step 1: Creating your project</summary>

To create your project sign up to ShareMint, choose "Creator", and click "Create Project". You will be guided through the steps to create the project.

If you've already signed up as an affiliate you can switch to Creator mode by clicking the button in the top right hand corner and clicking Switch Account Type. You can switch back whenever you like.

</details>

<details>

<summary>Step 2: Inviting affiliates to your project</summary>

You will find a link for affiliates to sign up to your project on your project dashboard. You can also add affiliates to the project manually or via our API.

</details>

<details>

<summary>Step 3: Inviting users to your project</summary>

Affiliates share a link with users to join the project. This page can be a ShareMint page or a direct page to your website after you've integrated the ShareMint SDK.

</details>

<details>

<summary>Step 4: Inviting your team</summary>

Once the project is set up you can invite others by going to the *Admin* tab and adding the Ethereum addresses of your choice.

</details>


# Affiliate Sign Up Page

Upon creating a project an affiliate sign up page will be created for you where affiliates can sign up.

An affiliate can connect their wallet on this page to get their invite code.

This page also provides stats and analytics about which users they have referred, how much revenue they've generated and the ability to change their referral code.

You also have the ability to create invite codes programmatically using our [API or NPM package](/fundamentals/integrating-sharemint-into-your-website).


# Referee Sign Up Page

Once an affiliate has signed up they will receive a link to share with others.

This link can point to three different page types:

1. ShareMint page
2. Direct website integration
3. HeyMint page
4. External program
5. ShareMint reward page

You set this when creating a project. You can later change this in the project *Settings* tab.

### ShareMint page

If you select "ShareMint page" users will be sent to a ShareMint website where they will be asked to connect their wallet.

You can also ask them to complete other steps before gaining access, such as following you on Twitter, liking tweets, being part of a Discord, or inviting others to the project. This is common in allowlists for NFT mints. You can also ask for a user's email at this stage.

Once a user has completed these steps they can be directed to a new url. For example, you might ask the user to connect their wallet and immediately send them to a page to complete their purchase.

### Direct website integration

If you select this option you will need to integrate ShareMint into your website. The integration is two lines of code and should be easy for your developer to add. For more on integrating directly into your website, see the [Integrating ShareMint into your Website](/fundamentals/integrating-sharemint-into-your-website) page.

### HeyMint page

You will be able to see this option only if you chosen "NFT" as your type of project.

Affiliates will be able to direct users to an HeyMint page for allowlists.

Make sure you add the URL of your HeyMint page after clicking on this option.

On HeyMint, in the project settings you will need to add the slug of your ShareMint program under "ShareMint slug" for ShareMint to be able to track referrals.

### External program

Select this option in a case where you have already built an in-house referral program or your program is powered by a different product and you still wish to use ShareMint in order to reach affiliates.

You will need to add the URL of the page the explains your program and allows affiliates to register.

Users will sent to a ShareMint page providing information about your program and a redirect button.

You will be able to add the program to the ShareMint marketplace for affiliates to find and communicate with the ShareMint partners directly from your dashboard.

### ShareMint rewards page

If you select "ShareMint Rewards Page" users will be sent to a ShareMint website where they will be asked to connect their wallet.

They will see a list of tasks they can complete in order to generate rewards.

After each task is completed, the user is able to claim the rewards by a click of a button.

You can also ask them to complete other steps before gaining access, such as following you on Twitter, liking tweets, being part of a Discord, or inviting others to the project. This is common in allowlists for NFT mints. You can also ask for a user's email at this stage.

Please speak to the ShareMint team in order to use this option.


# Integrating ShareMint into your Website

ShareMint offers the ability to integrate referral tracking directly into your website.

We have a dedicated NPM package that makes it easy to integrate. You can also use our API directly to perform the same functionality.

The API and NPM package offer the following features:

* Save a user and who has referred them
* Store page visits for analytics purposes
* Fetch a referral code for a user (or create one if they don't yet have one)

Full notes on how to integrate ShareMint into your website can be found at: [https://www.npmjs.com/package/@sharemint/sdk.](https://www.npmjs.com/package/@sharemint/sdk)


# API

ShareMint API documentation

## Fetch a project user

<mark style="color:blue;">`GET`</mark> `https://sharemint.xyz/api/external/user`

#### Query Parameters

| Name                                      | Type   | Description                                     |
| ----------------------------------------- | ------ | ----------------------------------------------- |
| slug<mark style="color:red;">\*</mark>    | String | Project slug                                    |
| address<mark style="color:red;">\*</mark> | String | User address or email                           |
| chain<mark style="color:red;">\*</mark>   | String | Blockchain name                                 |
| apiSecret                                 | String | Your secret API key from the project admin page |

{% tabs %}
{% tab title="200: OK Returns the user" %}

{% endtab %}
{% endtabs %}

## Get user address from invite code

<mark style="color:blue;">`GET`</mark> `https://sharemint.xyz/api/external/address-from-invite-code`

#### Query Parameters

| Name                                   | Type   | Description          |
| -------------------------------------- | ------ | -------------------- |
| code<mark style="color:red;">\*</mark> | String | User's referral code |
| slug<mark style="color:red;">\*</mark> | String | Project slug         |

{% tabs %}
{% tab title="200: OK Returns the user" %}

{% endtab %}
{% endtabs %}

## Get affiliate details

<mark style="color:blue;">`GET`</mark> `https://sharemint.xyz/api/external/affiliate`

One of address, projectUserId, or referralCode is required.

#### Query Parameters

| Name                                   | Type   | Description                                     |
| -------------------------------------- | ------ | ----------------------------------------------- |
| address                                | String | Affiliate's wallet address                      |
| projectUserId                          | String | Affiliate's id in project                       |
| referralCode                           | String | Affiliate's referral code                       |
| slug<mark style="color:red;">\*</mark> | String | Project slug                                    |
| apiSecret                              | String | Your secret API key from the project admin page |

{% tabs %}
{% tab title="200: OK Returns the affiliate details" %}

{% endtab %}
{% endtabs %}

## Get invite code

<mark style="color:green;">`POST`</mark> `https://sharemint.xyz/api/external/get-or-create-invite-code`

Get an affiliate's invite code. Create it if it doesn't exist.

#### Request Body

| Name                                      | Type   | Description     |
| ----------------------------------------- | ------ | --------------- |
| address<mark style="color:red;">\*</mark> | String | User's address  |
| chain<mark style="color:red;">\*</mark>   | String | Blockchain name |
| slug<mark style="color:red;">\*</mark>    | String | Project slug    |

{% tabs %}
{% tab title="200: OK Returns the affiliate" %}

{% endtab %}
{% endtabs %}

## Save a referral via referral id or wallet address

<mark style="color:green;">`POST`</mark> `https://sharemint.xyz/api/external/save`

One of address, email, or transactionHash is required.

#### Request Body

| Name                                   | Type    | Description                                                                                                                                                               |
| -------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| slug<mark style="color:red;">\*</mark> | String  | Project slug                                                                                                                                                              |
| invitedById                            | String  | The invite code of the referrer that invited the user                                                                                                                     |
| invitedByAddress                       | String  | The address of the referrer that invited the user                                                                                                                         |
| address                                | String  | User's wallet address                                                                                                                                                     |
| email                                  | String  | User's email                                                                                                                                                              |
| transactionHash                        | String  | Transaction hash                                                                                                                                                          |
| chain                                  | String  | Chain                                                                                                                                                                     |
| minter                                 | String  | One of "payer" or "receiver"                                                                                                                                              |
| apiSecret                              | String  | Your secret API key from the project admin page                                                                                                                           |
| verified                               | Boolean | If the referral is verified. Can only be set when providing an apiSecret                                                                                                  |
| disqualifiedAsReferee                  | Boolean | If the user is disqualified from being a referee. Can only be set when providing an apiSecret. This field has no impact if the user has already been referred by someone. |

{% tabs %}
{% tab title="200: OK Returns the information about the referral" %}

{% endtab %}
{% endtabs %}

## Save a referral via a transaction hash

<mark style="color:green;">`POST`</mark> `https://sharemint.xyz/api/external/save-transaction`

This saves both the referral and the payment made in the transaction.

#### Request Body

| Name                                              | Type    | Description                                           |
| ------------------------------------------------- | ------- | ----------------------------------------------------- |
| slug<mark style="color:red;">\*</mark>            | String  | Project slug                                          |
| email                                             | String  | User's email                                          |
| minter<mark style="color:red;">\*</mark>          | String  | One of "payer" or "receiver"                          |
| transactionHash<mark style="color:red;">\*</mark> | String  | Transaction hash                                      |
| chain                                             | String  | Chain                                                 |
| invitedById<mark style="color:red;">\*</mark>     | String  | The invite code of the referrer that invited the user |
| invitedByAddress                                  | String  | The address of the referrer that invited the user     |
| apiSecret                                         | String  | Your secret API key from the project admin page       |
| verified                                          | Boolean | Is the user verified?                                 |

{% tabs %}
{% tab title="200: OK Returns the information about the referral" %}

{% endtab %}
{% endtabs %}

## Save an event

<mark style="color:green;">`POST`</mark> `https://sharemint.xyz/api/external/save-event`

One of address, email, or projectUserId is required.

#### Request Body

| Name                                        | Type   | Description                                            |
| ------------------------------------------- | ------ | ------------------------------------------------------ |
| slug<mark style="color:red;">\*</mark>      | String | Project slug                                           |
| apiSecret<mark style="color:red;">\*</mark> | String | Your secret API key from the project admin page        |
| name<mark style="color:red;">\*</mark>      | String | Name of the event that you set in the project settings |
| value                                       | Number | Value of the event                                     |
| address                                     | String | User's address                                         |
| email                                       | String | User's email                                           |
| projectUserId                               | String | User's id on ShareMint for this project                |
| referredByCode                              | String | The invite code of the referrer that invited the user  |
| referredByAddress                           | String | The address of the referrer that invited the user      |

{% tabs %}
{% tab title="200: OK Returns the created event" %}

{% endtab %}
{% endtabs %}

## Save payment

<mark style="color:green;">`POST`</mark> `https://sharemint.xyz/api/external/save-payment`

One of address or email is required.

#### Request Body

| Name                                          | Type   | Description                                                                                                  |
| --------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------ |
| slug<mark style="color:red;">\*</mark>        | String | Project slug                                                                                                 |
| apiSecret<mark style="color:red;">\*</mark>   | String | Your secret API key from the project admin page                                                              |
| invitedById<mark style="color:red;">\*</mark> | String | Referrer's id                                                                                                |
| value<mark style="color:red;">\*</mark>       | String | Payment value. Must be bigger than 0                                                                         |
| invitedByAddress                              | String | Referrer's address                                                                                           |
| quantity                                      | String | Amount of purchases                                                                                          |
| chain                                         | String | Blockchain name. Can be "FIAT", "ETHEREUM", "POLYGON", "ARBITRUM", "OPTIMISM", "SOLANA", "GOERLI", "SEPOLIA" |
| address                                       | String | User's address                                                                                               |
| email                                         | String | User's email                                                                                                 |

{% tabs %}
{% tab title="200: OK Returns the id of the user" %}

{% endtab %}
{% endtabs %}


# Affiliate Token Gating

You can offer different rewards to different affiliates using token gating. For example, if someone holds a Bored Ape, you might give them a 50% affiliate reward, whereas the standard tier is a 20% reward. This works great for existing communities where you can reward your early holders with higher rewards.

Token gating works for both regular tokens (ERC20) and NFTs (ERC721).

To add token gating to your project go to the project *Settings* tab, and click *Add Group* in the *Token Gating* section.

You can also add affiliate groups behind a secret URL without the affiliate needing to hold any tokens. Anyone with the URL will be able to join the higher rewards tier.

<figure><img src="/files/zPfSdBnQFLPah6vNgVDu" alt=""><figcaption></figcaption></figure>

**Group Name:** a name for the affiliate group. For example, Llama Holders.

**Affiliate Reward:** the revenue share an affiliate in the group will earn.

**Token Address:** the address of the ERC20 or ERC721 token to gate the affiliate page. You can find the address of a token on [Etherscan](https://etherscan.io). The token address will start with *0x* and look something like *0x123abc123abc456...* This field is optiona&#x6C;*.* You can also create affiliate groups behind a secret URL where no token is required to gain access.

**Token Name:** the name of the token to display to users. For example, *Bored Ape Yacht Club*.

**Tokens Required:** how many tokens a holder must own to gain access. The default is one token.

**Custom Slug:** if set we will create a dedicated URL where token holders can sign up. They will also be able to sign up via the standard affiliate sign-up page and if we see they are holding tokens that enable higher rewards we will display a message to them to let them know.

**Custom Description:** a custom message on the dedicated page for this affiliate group. If no custom description is set then the default description for the project is used.


# Inviting other Admins

You can invite team members to your project by going to the *Admin* tab within your project and adding their Ethereum address.


# Bulk Upload Users

Bulk upload users in CSV format.

You can bulk upload users to ShareMint using a CSV file. This makes it easy to import users from other sources such as Premint or Alphabot and attribute a referrer to these users.

To bulk import users, go to your project's dashboard, and click the "*Add Affiliate"* button. Then go to the "*Bulk"* tab.

Click "*Choose file"* and select the CSV file to be uploaded.

The CSV file should have a header line followed by the users you'd to upload. The file must contain a column called "wallet\_address" representing the users address. You can also add a column called "referrer" which represents the referrers the address.

If you'd like to attribute all users to a single a referrer address fill in the "Referrer address" field. If the CSV already has a referrer value for a user this will be used instead. User rows without a referrer field will use the referrer you set in the "Referrer address" field in the form.

When you're ready click "Upload". Once complete you can go to the "Referee" tab of the dashboard to view the newly added users.

<figure><img src="/files/6pZMqGE7Xttj9CQnoMhM" alt=""><figcaption><p>Bulk upload users via CSV</p></figcaption></figure>


# Export as CSV

Export your data in CSV format to analyse in your own tools.

To export your data as CSV you can go to the dashboard for your project and click the Export to CSV button at the top of the users table.

This will export all your users and will also include additional information that may be helpful such as a hash of the user's IP so you can check if there are users using the same IP trying to game your referral program.

<figure><img src="/files/hg0ufvrDF6UE9rWsvaKW" alt=""><figcaption><p>Export to CSV</p></figcaption></figure>


# Bulk Payouts

Payout all users in one click.

ShareMint makes it easy to payout all your affiliates in a single click via the Payouts page of your project.

We show you who you still need to pay, who you've paid already, and how much you've paid to each affiliate.

#### Solana

We do not offer bulk payout support for Solana. We do provide you with all the data for who to payout but the payouts themselves you will have to handle yourself.

#### Custom EVM Chains

For custom EVM chains the support for mass payouts is dependent on your exact chain and you should get in touch with our team to check whether we can support payouts for your chain. At a minimum your chain will need to support the Disperse contract. But if it doesn't already, it's easy to deploy the contract to your chain.

#### Automated payouts

If you prefer to pay out affiliates automatically, you can add code to your smart contract to allow this to happen. The advantage is that affiliates will be paid faster. The disadvantage is that this can lead to bugs and requires changes to your contract.

The advantage of using a single click payout system that allows you to pay when you choose is that you can first see everything is in order before you make the payout. You don't have to make any smart contract changes to support payouts.

You can use both systems together and we're happy to assist you make changes to your smart contract for payouts as necessary.

#### Manually mark payouts

We offer the ability to manually mark a payout as processed so if you decide to pay them via a different method you can still update the accounting on the ShareMint platform.


# Support for fiat payments

ShareMint supports for fiat payments via our API.

To use this feature visit the *Admin* page of your project. In the section you can get an API access key. This key is secret and allows you to add payments made in fiat.

The API endpoint to add a fiat payment is:

```
POST https://sharemint.xyz/api/external/save-payment
```

With data:

```
slug: string
apiSecret: string
invitedById: string
value: string
quantity?: string
address?: string
email?: string
```

`slug` is the ShareMint project slug.

`apiSecret` can be found on the project's *Admin* page.

`invitedById` is the referral code of the user that referred this payment.

`value` is the amount paid in US Dollars.

`quantity` is the quantity of items purchased. Optional and defaults to `1`.

`address` is the purchaser's crypto wallet address.

`email` is the purchaser's email address.

One of `address` or `email` is required.


# Tiered Rewards

The tiered rewards feature is designed to encourage users to engage with your program at a deeper level by providing increasing benefits for higher levels of engagement.

### Overview

Tiered rewards is a system where your users can earn more rewards as they refer more people. The structure is set up so that greater rewards are earned at higher "tiers" of referrals. For example, a user may earn 5 USDC for the first referral, but earn 20 USDC for three referrals, and so on. This system creates a compelling incentive for users to refer as many people as they can.

Here's an example:

* **1 invite**: Reward 5 USDC
* **3 invites**: Reward 20 USDC
* **10 invites**: Reward 100 USDC

### Setting Up Tiered Rewards

To set up a tiered rewards program, follow these steps:

1. **Visit your Project settings**
2. **Select the 'Tiered' option in the Affiliates section**
3. **Add a Tier by clicking "Add Reward"**: set the reward to the value you want. eg 10 USDC.
4. **Click "Advanced referee requirements" and set referrals required to unlock**: you can set a different number of referrals and conditions to unlock each tier.

<figure><img src="/files/ApDZMtKjELyPbTMjkFPB" alt=""><figcaption><p>Tiered Rewards</p></figcaption></figure>

<figure><img src="/files/dIh1rUl87w1snMdO3dAG" alt=""><figcaption><p>Add a reward tier</p></figcaption></figure>

An affiliate will unlock all earn the rewards in each tier. Tiers are not mutually exclusive. If you have a reward for inviting 3 people, and a reward for inviting 10 people, if the affiliate invites 10 people, they will have unlocked both rewards.

### Communicating Tiered Rewards to Users

It's important to clearly communicate how your tiered rewards system works to your users. You may wish to provide details in your terms and conditions, in the referral program section of your website, and in any marketing or communication materials relating to the program.

Remember to highlight the benefits of reaching higher tiers to encourage users to make more referrals.


# Referee Requirements

The power of our referral platform isn't just in the simple ability to invite others to join your project. It extends to its advanced capabilities, allowing you to track and reward based on various intricate criteria. Our Advanced Referee Requirements feature lets you do just that, providing you with the ability to define and monitor sophisticated event sequences.

### What are Advanced Referee Requirements?

While simple requirements might only involve the act of inviting a friend to your project and them making a minimum purchase, advanced requirements are far more diverse and flexible.

For example, you may want to monitor a smart contract event like staking or trading. But rather than considering the full volume of the trade, you're only interested in a portion of the revenue that the protocol earns. Advanced referee requirements can be set up to capture these more nuanced activities.

Advanced referee requirements can also be API event-driven. That means you can track events in other systems and use those as part of your referral criteria.

<figure><img src="/files/TSBU5CPH0Yl81lsjtW01" alt=""><figcaption><p>Smart contract requirements</p></figcaption></figure>

### Setting Eligibility Thresholds

Not only can you monitor a vast range of events, but you can also set thresholds for these events that need to be passed for a referee to be considered eligible. For instance, you could require a user to stake a minimum amount of currency or achieve a particular level in a game.

### Combining Multiple Events

The Advanced Requirements feature also enables the combination of multiple events to form a sequence or series of tasks. For instance, you could require a user to unlock five treasure chests, level up three times, and stake 1 ETH. Only when all of these tasks are completed does the referee meet the requirement.

<figure><img src="/files/0J7inbfTMUeodBHOw8U8" alt=""><figcaption><p>Custom API event requirements</p></figcaption></figure>

Read on to learn about the different requirement types and how to use each one.


# Smart Contract Events

Track smart contract events by referees to reward affiliates.

This section explains how to reward affiliates based on the smart contract events performed by the users they invite.

To add a Smart Contract Event requirement, navigate to your project's settings page. In the *Affiliates* section, click on *Advanced Referee Requirements*, and choose *Smart Contract Event* as the requirement type.

You will be asked to fill in the following fields:

* **Event Name** - a user friendly name that is displayed in our UI.
* **What is the minimum value required to be considered a referral?** - This is a numeric value threshold above which an affiliate is considered to be valid. You can leave this blank or set it to 0 if you'd like to allow any value.
* **Chain** - Which blockchain the event occurs on.
* **Smart Contract Address** - The smart contract on which to track the events.
* **Event ABI** - The ABI for the event to track. This can be copied and pasted from Etherscan. Ask a developer or reach out to us if you need help with this.
* **Event ABI Address Field** - This is the address to track within the event. For example,  if you have a staking event represented by `Stake(address staker, unit256 value)` this field would be set to `staker`.\
  Note, this field will only be editable once a valid ABI is set. Only indexed topics can be tracked.
* **Event ABI Value Field** - This is the value field to track within the event. For example,  if you have a staking event represented by `Stake(address staker, unit256 value)` this field would be set to `value`. So if you want to reward affiliates with 5 USDC for every referee that stakes at least 100 value, this is the field we'd check to see if the condition has been fulfilled.\
  Note, this field will only be editable once a valid ABI is set.

This is an example of settings for tracking Lido staking:

<figure><img src="/files/ySPd2LcU1JchDjult3nh" alt=""><figcaption><p>Tracking Lido staking</p></figcaption></figure>

You can require that referees complete multiple requirements to be considered eligible for a reward to be unlocked. To require multiple requirements, click on the plus icon at the bottom of a requirement. You can combine smart contract requirements with other types of requirements.


# API Events

Submit custom events to track referee actions and reward affiliates.

You can send custom events to ShareMint using our API.

These events are associated with referees and are used to reward affiliates.

For example, if you have a web3 game, and your game has a breeding event, you can reward an affiliate that invites a user to the game that breeds at least 5 times. To determine whether the conditions have been completed, you would send a breed event to our API each time the user breeds. One we recieve 5 breed events, the affiliate reward will be unlocked.

To add an API Event requirement, navigate to your project's settings page. In the *Affiliates* section, click on *Advanced Referee Requirements*, and choose *API Event* as the requirement type.

You will be asked to fill in the following fields:

* **Event Name** - the name of the event. This must match the event name sent via API.
* **What is the minimum value required to be considered a referral?** - This is a numeric value threshold above which an affiliate is considered to be valid. You can leave this blank or set it to 0 if you'd like to allow any value.

<figure><img src="/files/OcCcEcStJY5uq6V3XVNm" alt=""><figcaption><p>Example using API Event</p></figcaption></figure>

### API

Send events using our API:

## To save custom events.

<mark style="color:green;">`POST`</mark> `https://sharemint.xyz/api/external/save-event`

One of `address`, `email`, or `projectUserId` must be provided, otherwise, the request will not be processed.

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body

| Name                                        | Type   | Description                                                                                    |
| ------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------- |
| slug<mark style="color:red;">\*</mark>      | String | Project slug                                                                                   |
| apiSecret<mark style="color:red;">\*</mark> | String | Find this on the admin tab of your project                                                     |
| name<mark style="color:red;">\*</mark>      | String | Event name that should match an event name used for requirements on the project Settings page. |
| value                                       | Number | A custom value for the event.                                                                  |
| referredByCode                              | String | The referral code of the referrer that invited the user. This will usually be blank.           |
| referredByAddress                           | String | The address of the referrer that invited the user. This will usually be blank.                 |
| address                                     | String | The address of the user that performed the event.                                              |
| email                                       | String | The email of the user that performed the event.                                                |
| projectUserId                               | String | The ShareMint id of the user that performed the event.                                         |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}

{% tab title="500: Internal Server Error " %}

{% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}

{% tab title="401: Unauthorized " %}

{% endtab %}

{% tab title="403: Forbidden " %}

{% endtab %}

{% tab title="404: Not Found " %}

{% endtab %}
{% endtabs %}


# API Points

The points API allows you to unlock affiliate rewards based on how many points each referee has received.

You can send points for each user to ShareMint using our API.

These points are associated with referees and are used to reward affiliates.

You can send multiple points for each user. For example, you can send us a score of 100 for fighting, 120 for breeding, and 200 for forging. You can set a requirement that rewards are unlocked if a referee has a score of at least 100 across all three categories.

To add an API Points requirement, navigate to your project's settings page. In the *Affiliates* section, click on *Advanced Referee Requirements*, and choose *API Points* as the requirement type.

You will be asked to fill in the following fields:

* **Name** - the name of the key to store the points under. This must match the  name sent via API.
* **What is the minimum value required to be considered a referral?** - This is a numeric value threshold above which an affiliate is considered to be valid. You can leave this blank or set it to 0 if you'd like to allow any value.

In this example, a referee must have a breeding score of at least 5, and a forging score of at least 8:

<figure><img src="/files/F458S55rQpWyIhdMG3i2" alt=""><figcaption><p>API Points example</p></figcaption></figure>

### API

Send points using our API:

## To save points.

<mark style="color:green;">`POST`</mark> `https://sharemint.xyz/api/external/save-points`

One of `address`, `email`, or `projectUserId` must be provided, otherwise, the request will not be processed.

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body

| Name                                        | Type   | Description                                                                                                                                                                                                 |
| ------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| slug<mark style="color:red;">\*</mark>      | String | Project slug                                                                                                                                                                                                |
| apiSecret<mark style="color:red;">\*</mark> | String | Find this on the admin tab of your project                                                                                                                                                                  |
| keyPoints<mark style="color:red;">\*</mark> | String | Key value pairs of points. Example: `{"breeds": 12, "quests": 44}`. The value is the number of points the user has amassed. This will override previous user scores. Keys not supplied are left unaffected. |
| address                                     | String | The address of the user to store the points for.                                                                                                                                                            |
| email                                       | String | The email of the user to store the points for.                                                                                                                                                              |
| projectUserId                               | String | The ShareMint id of the user  to store the points for.                                                                                                                                                      |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}

{% tab title="500: Internal Server Error " %}

{% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}

{% tab title="401: Unauthorized " %}

{% endtab %}

{% tab title="403: Forbidden " %}

{% endtab %}

{% tab title="404: Not Found " %}

{% endtab %}
{% endtabs %}


# Checking your program before launch

Steps to take as part of your prelaunch checklist.

There are two things to check before launching your ShareMint campaign:

1. That referrals are being captured by ShareMint
2. That blockchain transactions (or API events) are being recognized by ShareMint

### 1. Check referrals are being captured by ShareMint

You can check that a referral has been made by visiting the admin dashboard and clicking on the Referees tab. This page contains all the members that have been invited to the ShareMint project. To view who has invited a specific user, you can check the "Invited By" column to see which affiliate referred the user.

If a user has joined the project but you don't see an affiliate in the "Invited By" column you likely have a problem with the SDK integration and your developer needs to make sure they're sending the correct data to ShareMint when a user connects their wallet.

### 2. Check blockchain transactions are being recognized by ShareMint

Once a user is registered in the ShareMint dashboard, the next step is to check that purchases by the user are being correctly tracked by us. This can be done by making a test purchase and checking that the ShareMint dashboard picks up the transaction. If the transaction has been correctly recognized, you will see the "Purchased" and "Paid" columns update for the user. You can also check the Activity tab at the top of the page to check changes for your project.

One other thing you can check is whether we're fetching blocks for your project by visiting the bottom of the "Admin" page. You will see "Last block fetched" at the bottom. If no blocks have been fetched there is a misconfiguration with your project. This can happen if you're using a custom EVM and have used a free RPC endpoint with limited fetch capabilities.

If you're having problems with this step there's a limited amount you can do to fix it so please be in touch with our team to see if we can help. It's important step 1 is working properly before trying to fix anything in step 2. We do not track transactions if no referees are in the system.


# For NFT Collections

ShareMint works great for NFT creators.

Incentivise your community to invite friends to you project by providing a referral link to each member.

It also aligns you properly with external partners you work with by offering them a revenue share from the revenue they generate for the project.

Affiliates can refer directly to the mint page or in the allowlist phase. ShareMint natively supports allowlists and also provides an integration for HeyMint allowlists.

NFT collections that launched a program on ShareMint achieved great results. You can learn more about them [here](https://blog.sharemint.xyz/nft-case-studies).


# For NFT Marketplaces

If you run an NFT marketplace you can use ShareMint to share marketplace revenue with affiliates.

Each purchase by a user generates revenue for the platform. You can dedicate a percentage of this revenue to affiliates that refer users.

Every exchange offers affiliate rewards and an NFT marketplace should be no different.


# For Gaming

If you run a web3 game you can use ShareMint to incentivise referrals for primary sales of your NFTs, or secondary sales in your marketplace.

Gamers are far more likely to invite friends if they're incentivised to do so.


# For DeFi Protocols

If you run a DeFi protcol you can incrase the protocol volume by launching a web3 referral program on ShareMint. Lido were able to increase staked ETH on the platform by over $2b using their referral program.

Reward affiliates with a portion of the revenue they generate for the protocol or tokens.

There are several DeFi protocols who managed to increase their volume drastically by launching a referral program. You can find a number of case studies [here](https://blog.sharemint.xyz/defi-case-studies).


# For DEXs

If you run a decentralised exchange you can use ShareMint to share exchange revenue with affiliates. CoW Swap was able to boost volume by over $400m using their affiliate program.

Reward affiliates with a portion of the revenue they generate for the protocol.

Every exchange offers affiliate rewards and DEXs should be no different.


# For Newsletters

Add a referral program to your newsletter. Incentivise subscribers to share your newsletter by rewarding them with an NFT or hidden content.

Morning Brew is an example of a newsletter that leveraged referrals to grow its subscriber base to millions.


# NFT Mints

NFT collections that have launched a referral program on ShareMint achieved amazing results. One example is a project that was able to generate over 150 ETH from affiliate sales only.

You can learn more about them [here](https://blog.sharemint.xyz/nft-case-studies).


# DeFi Protocols

Several DeFi protocols managed to increase their volume drastically by launching a referral program. an example is Lido, who have managed to increase staked ETH on the platform by over $2b by launching their referral program.

You can find a number of case studies [here](https://blog.sharemint.xyz/defi-case-studies).


