# Projects: Deploying Your Own DIY Supernova Pool

{% embed url="https://vimeo.com/577385531" %}

[**Our v3 app**](https://v3.polarisdefi.io/) **(**[**Polygon here**](https://poly.polarisdefi.io)**)** allows any project to deploy and fund their own Supernova contract through an easy to use interface. Users will also be able to easily find and stake in the pools to start earning rewards. There is a **performance fee of 4% of reward tokens** (when users harvest) that will go to the team and Polaris treasury.

The goal is make it **as simple as possible** for new projects to launch their own farms and incentivize liquidity for their projects through a proven and fair token distribution method.&#x20;

When we say "as simple as possible" we really mean it!&#x20;

The entire process to deploy your own farm **takes less than 2 minutes and only requires a few clicks.**

Before creating the pool, you need the following:&#x20;

1. **Staking token contract address** - this is the token you want users to stake. In most cases, it is the TOKEN-BNB or TOKEN-BUSD LP token on Pancake Swap or another DEX.
2. **Reward token address** - this is the token users will be rewarded in. In most cases it will be your project's token.
3. **Bonus period length** - this is an OPTIONAL setting to incentivize users to stake for longer in the pool. This is the number of days it will take for yield-reward-share to ramp up to the maximum rate if a users keeps their shares staked. For example, if you set the length to "30 days" with a max time bonus of 3x, a user will earn 3 times as many rewards tokens on day 30 as they will on day 1 provided they stay staked the entire time. For more technical details, see the [Supernova Emissions Mechanism](supernova-emission-mechanism).
4. **Max time bonus** - this is also OPTIONAL. It's the reward token emission rate multiplier for users who stay continuously staked during the bonus period. Again, if the max time bonus is set to 3x, and the bonus period length is set to 30, then at the end of 30 days, a user will earn 3x as many reward tokens as they will on day 1 (provided they stay staked the entire time). This bonus multiplier works linearly so on day 15, they will earn 1.5x as many reward tokens as day 1.&#x20;
5. **Liquidity** for your staking and reward tokens on PancakeSwap (BSC), Quickswap (Polygon) or SushiSwap (Polygon). If you don't have liquidity yet, your pool will not automatically appear and you'll need to contact someone from our team to manually push it live

**WARNING**: Polairs Supernova contracts do not fully support **single-token staking** for tokens with a transfer tax. What happens is some users will be taxed slightly more or less than others. So use single token staking with transfer tax tokens at your own risk.

However, tax tokens may be used as LP tokens.&#x20;

Example:

* Stake **RFIFORK** earn **RFIFORK** will have some issues (some users will be taxed more than others)&#x20;
* Stake **RFIFORK-BNB LP** earn **RFIFORK** does work (token tax works as it should)

## How to Create Your Pool

1. Go to [https://v3.polarisdefi.io/create-pool](https://v3.polarisdefi.io/create-pool) and connect with the wallet you will be funding your pool with
2. Enter the staking token address, reward token address, bonus period length and max time bonus
   1. **Staking token address:** this is usually the CAKE LP address of your TOKEN/BNB or TOKEN/BUSD
   2. **Reward token address:** this is usually your TOKEN contract address
   3. **Bonus Period:** recommended setting: 30 (for 30 days)
   4. **Max time bonus**: recommended setting: 3 (for 3x)
3. Click "Confirm pool" and confirm your transaction&#x20;
4. Once your pool is created, wait a few moments for it to appear in the "All Pools" page in the dashboard

## How to Fund your Pool

_Note that there is a **performance fee of 4% of reward tokens** (when users harvest) that will go to the team and Polaris treasury._

![](https://2340594966-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVSQjtKqzBC752VII7b%2F-MbxNvrRZIRmwOCoaqAY%2F-MbxWhgHshbw_Tuee4Fw%2Fimage.png?alt=media\&token=f8840040-b5cf-4d51-9597-f1669bd36c3f)

1. Once your pool appears in the main dashboard, click into it and click "**Manage Pool**" in the top right. Make sure you connect with the same wallet address you used to create your pool
2. In the "**funding amount**" field, enter the total amount you wish to fund. This is the total rewards that will be distributed to stakers over the farming period.The exact distribution rate will depend on the bonus period and max time bonus you set in the initial pool set up.
3. In the "**farming period**" field, set the total number of days you want the rewards to be distributed over
4. In the "**starting at**" field, set the start time when the reward distribution will start in [Unix time.](https://www.epochconverter.com/) Note that users can stake and unstake BEFORE this time, but rewards will not be live until this set time. If you want rewards to start immediately, use the default value.
5. Approve the contract and confirm the transaction
6. Once approved, fund the rewards and confirm the transaction

**Note**: Once rewards are funded, they will be locked inside of the staking contract and distributed to stakers according to your set schedule. For the safety of users, you will NOT be able to withdraw these rewards later so make sure to double check all your info before submitting.

Also, you will be able to fund your Supernova multiple times, at any time. This means you can "refill" the pool while the farming is still ongoing, as well as after it's finished.

## How to Claim User Deposited POLAR Tokens

![](https://2340594966-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVSQjtKqzBC752VII7b%2F-MbxNvrRZIRmwOCoaqAY%2F-MbxWxbkw4YmqGv_CF61%2Fimage.png?alt=media\&token=cb71c2e0-df57-4f2a-921c-13dafd554986)

Users who stake in your pool will have the option of spending POLAR when they harvest rewards to multiply their rewards. The used POLAR will be locked into your Supernova contract until you withdraw them. When you withdraw, half of the POLAR will be burned and the other half will be sent to your wallet which you may use for development funds.

1. Go to your pool's "Manage" page
2. Click "-Withdraw" tab
3. The field will auto populate with the amount of available POLAR in your pool
4. Click "Withdraw" to withdraw half to your wallet (the other half will be automatically burned)

## How to Verify Your Pool Contract

We've designed the POLAR app for anyone to create a Supernova pool without technical Solidity knowledge. However, if you need to verify your pool contract for whatever reason, you can do so by following these steps below:

**Tutorial**: [https://vimeo.com/549336276](https://vimeo.com/549336276)

1. Go your Supernova pool contract that was created and verify your contract:
   1. Compiler: 0.6.12
   2. MIT license&#x20;
   3. Enable optimization:&#x20;
      * **BSC**: 10000 (make sure to enable optimization and enter “10000” in misc when verifying)
      * **Polygon**: 200
   4. Use this source
      * **BSC**: [https://github.com/polarisdefi/supernovav2/blob/master/contracts/test.sol](https://github.com/polarisdefi/supernovav2/blob/master/contracts/test.sol)
      * **Polygon**: [https://github.com/polarisdefi/supernova-contract-matic/blob/master/Supernova-verification.sol](https://github.com/polarisdefi/supernova-contract-matic/blob/master/Supernova-verification.sol)
   5. Use this for ABI ([https://abi.hashex.org/#](https://abi.hashex.org)):&#x20;
      1. SuperNova (test.sol)&#x20;
      2. Enter same parameters as initial configuration
      3. “polar\_” field is:&#x20;
         * **BSC:** 0x70905594023Cb2f37F3103fDc70315ad1601D6EF
         * **Polygon**: 0xdc3acb92712d1d44ffe15d3a8d66d9d18c81e038
      4. "feeCollector" address is: 0xEbCf6b78b66706395643DEe17d7E1E573bBE51CE
