A Simple Guide to the HOPR Farm

Qianchen YU
HOPR
Published in
8 min readMar 23, 2021

--

The Immunefi bug bounty on the HOPR liquidity farm has finished and revealed only very minor and cosmetic issues, which have been addressed. That means the HOPR Farm is ready to launch! This post will walk you through the process, and explain how to earn part of the 5m HOPR token reward.

Credit: Priscilla du Preez, Unsplash.com

The 5 million HOPR token reward is reserved for incentivizing liquidity providers of the HOPR-DAI pair on Uniswap. The tokens will be supplied to the farm smart contract by the Genesis DAO by Wednesday 24th March. From this point on, it will be possible to plant UNI-V2 liquidity tokens in the farm and earn rewards over 13 weekly periods. The first period will start approximately on Tuesday March 30th at 2pm CET. (This may change very slightly due to block times — the precise block number can be found here.) The final period will end around Sunday 27th June (exact block here), at which point the HOPR Farm will close and all 5 million HOPR tokens will have been awarded.

Liquidity farming can seem complicated, so we’ve built a handy interface for the HOPR Farm which will let you provide liquidity, plant your liquidity tokens in the farm, harvest your rewards, and eventually reclaim your liquidity tokens, all from a single page.

The Genesis DAO is currently the largest provider of liquidity. It will continue to provide liquidity, but will not submit its liquidity tokens to the HOPR Farm contract, and will not earn any of the extra rewards.

WARNING: Acting as a Uniswap Liquidity provider carries significant risk of impermanent loss. Proceed at your own risk, and only commit funds you can afford to lose.

How it Works

The DAO proposal was for 5m HOPR tokens issued as liquidity mining rewards spread over 3 months. This will be implemented entirely on-chain as the HOPR Farm, a smart contract which will allow liquidity providers to “plant” their liquidity tokens and then “harvest” rewards after each full week. Once the HOPR Farm ends, or you’re ready to leave, you can “Destroy” your farm holdings to withdraw any outstanding harvest and reclaim your liquidity tokens.

The HOPR Farm can be accessed via the interface at https://hopr-farm.eth.link/.

The smart contract for the HOPR Farm can be found at 0x2fc0e2cfe5d6ea300d555e5907319a5f7e09884f

The HOPR Farm will last for three months, determined as 13 periods of almost exactly a week (“almost exactly”, because the time has to be calculated in blocks, and block times can fluctuate slightly). Rewards will be divided evenly across this period, with 384,615 HOPR tokens available for harvest each week.

The first period will begin at exactly block 12141500.

To participate in the HOPR Uni Farm, you’ll need to provide liquidity to the HOPR / DAI pool on Uniswap. There are other pools available which pair different assets with HOPR, both on Uniswap and elsewhere — only the HOPR / DAI Uniswap pool can earn you a share of the 5m extra HOPR tokens.

When you provide liquidity to the pool, you’ll receive an allocation of UNI-V2 tokens. The contract for these can be found here: https://etherscan.io/token/0x92c2fc5f306405eab0ff0958f6d85d7f8892cf4d

It’s these UNI-V2 tokens which will be “planted” in the HOPR Farm smart contract.

WARNING: To participate in the extra liquidity mining incentives you need to send liquidity tokens to the HOPR liquidity farm smart contract. These liquidity tokens are needed to claim your original assets back from the Uniswap pool and can be withdrawn from the HOPR liquidity farm at any time. A bug bounty on the contract revealed only minor and cosmetic issues, which have since been fixed, but the contract has not been further audited. Proceed at your own risk.

Reward Periods and Allocation

Your UNI-V2 tokens must stay in the HOPR Farm smart contract for at least one full period to be eligible to receive rewards. It’s not sufficient to keep them in for a week: Rewards will be calculated at the end of each period, based on the amount of UNI-V2 tokens in the contract since the start of the period. So if you join halfway through Period 1 and leave halfway through Period 3, you’ll only earn rewards for Period 2 — the only full period you were joined for.

Rewards will be calculated in much the same way as pool fees. If, for example, you contributed 5% of the liquidity tokens for a given period, you would receive 5% of the weekly reward.

You can add or remove tokens at any time, but only tokens which are in the smart contract for a full period will count towards rewards for that period. So if you remove tokens before a period ends, this will reduce your payout as those tokens won’t count for the period at all. If you add tokens, they won’t count until the next period begins (and you’ll need to leave them in the contract for the full period).

Using the HOPR Farm

We have provided a user interface for the community to facilitate their farming. You’ll need to have both HOPR tokens and DAI stablecoins in your MetaMask wallet to provide liquidity.

Connect to the Farm application

Unlock the wallet you want to provide liquidity from on MetaMask and choose “Ethereum mainnet” network. Visit the HOPR Farm at https://hopr-farm.eth.link/ and click “Connect Wallet” (1).

You’ll see a Metamask popup. Choose the correct account, click “Next” (a) and then “Connect” (b).

After connecting your wallet to the HOPR Farm interface, you’ll see an overview of the HOPR Farm status (2). This bar tells you the:

  1. current period
  2. countdown to the start of the next period.
  3. current position in the overall farm lifecycle of thirteen periods

Remember, farming rewards can only be earned by providing liquidity for complete week-long periods.

The interface also shows the connected wallet address and the network it’s connected to (3). Please make sure that it’s on “Ethereum Mainnet”.

Plant

To become a liquidity provider, you’ll need to stake DAI and HOPR of equal value. The farm interface is linked directly to the HOPR-UNI pair. Simply click “Become a liquidity provider” to stake your HOPR and DAI tokens (4).

Enter the amount of DAI (5) or HOPR (6) you want to provide. The interface will automatically compute the corresponding amount of the other token.

Once you are satisfied with the amount and configuration, scroll down and follow the standard steps to provide liquidity on Uniswap and “supply” tokens. (7)

Once you’ve successfully provided liquidity on Uniswap, click “Return to Farm” (8)

Now you’ll be back on the main page. You should now be able to see the liquidity tokens (Uni-V2) you just received by providing liquidity on Uniswap. The maximum amount will be prefilled in the “Plant” field. (9)

If you cannot see the updated amount, refresh the page and connect to your wallet again. When you see the correct value, click on “Stake UNI-V2” to stake your liquidity tokens. You are about to “plant” “seeds” in the farm.

MetaMask will pop up twice, the first time to ask for a signature (10) and the second to confirm a transaction (11). The signature grants permission for the HOPR Farm contract to transfer UNI-V2 tokens from your account. The transaction actually completes the transfer.

Adjust the gas price to an appropriate value before clicking “Confirm”.

The transaction will now be broadcast to the network, and you’ll be redirected to the main farm page. You should be able to see a spinning wheel next to the “Plant” field:

This step needs a little patience. The wheel will keep spinning for a little while even after the transaction is confirmed on blockchain. The farm waits until three blocks after the transaction is finalized before returning to the normal state. Please don’t refresh the page!

Once the spinning wheel has disappeared, you should see the amounts have updated: the “Plant” field will show 0 but the “Destroy” field will show the amount of UNI-V2 tokens you have staked. If you cannot see the updated figures, please refresh the page.

Harvest

Once your seeds have been planted for an entire period (so after at least one week), you can come back and start harvesting your earnings by clicking “Claim HOPR” (12).

MetaMask will pop up to ask for confirmation to broadcast the transaction on chain.

Note that you don’t need to harvest every week. Each harvest needs an on-chain transaction to claim your rewards. It’s up to you to decide when harvesting makes most sense. You may choose to wait until the very end of the liquidity mining program to claim all the rewards, or you can claim every period and restake for compound interest.

Destroy

You can claim all your unclaimed rewards and retrieve your staked UNI-V2 tokens by “destroying” your farm, or calling ”withdraw UNI V2” (13).

MetaMask will pop up to ask for confirmation to broadcast the transaction on chain.

You can “destroy” your farm at any time. If you do it before the end of the three-month farming period, this will still claim all your accumulated rewards, but you will lose any claim to rewards for the current period.

Please note that the “Destroy” phase will return your UNI-V2 to your wallet, but will NOT automatically remove your HOPR and DAI liquidity from the Uniswap pool. You will have to do this yourself via the Uniswap interface.

WARNING: Once you cash in your UNI-V2 tokens and reclaim your HOPR and DAI, you will be subject to impermanent loss. Make sure that you understand this concept BEFORE you become a liquidity provider.

We’re very excited to have been able to facilitate this final part of the Genesis DAO proposal for the HOPR token launch. If you’re a HOPR token holder and you’re happy that you understand the risks of being a liquidity provider, we hope you’ll find it simple and rewarding to participate in the HOPR Farm.

As always, if you have any questions, please head to our Telegram channel where the ambassadors will be able to help you out.

Happy farming!

Qianchen “Q” Yu,
HOPR Decentralized Technology Architect

Website: https://www.hoprnet.org
Twitter: https://twitter.com/hoprnet
Telegram: https://t.me/hoprnet
LinkedIn: https://www.linkedin.com/company/hoprnet

--

--

Qianchen YU
HOPR

Decentralized Technology Architect | Think for environment and energy