Balancer added to AllianceBlock Liquidity Mining: a Tutorial

Nexera
7 min readDec 1, 2020

--

Introduction

Recently we have announced the launch of AllianceBlock’s very own liquidity mining product. On its first release there was the possibility to add liquidity to our Uniswap pools, a tutorial on this was released as well. The AllianceBlock Liquidity Mining product allows users to provide liquidity through a number of different protocols, starting with Uniswap, and stake their liquidity pool tokens for a reward in ALBT and FRONT and later additional reward from other strategic partners.

The article contains a detailed step by step visual guide to introduce users to AllianceBlock Liquidity Mining User Interface using Balancer pools.

What does Liquidity Mining mean for AllianceBlock?

At the heart of AllianceBlock is our vision to connect Traditional Finance markets (TradFi) with Decentralized and Digital Assets markets (DeFi) bringing new financial opportunities to both worlds. Such disruption, however, does not happen overnight and can be achieved only by the process of systemic innovation and gradual improvements. One of the first steps on our journey is to bring sufficient liquidity to DeFi ecosystems and prime them to accommodate transaction volumes and liquidity demands associated with global financial markets.

AllianceBlock Liquidity Mining (ABLM) product is the first of the many products to be released that will form the foundation of the AllianceBlock ecosystem. ABLM will seamlessly integrate with AllianceBlock Protocol — our blockchain-agnostic layer 2 protocol that bridges traditional and decentralized finance and automates the process of converting any digital or crypto asset into a bankable product.

Adding Liquidity to a Balancer Pool

Once you’ve arrived to the AllianceBlock Liquidity Mining Portal at lm.allianceblock.io, MetaMask will pop up and ask you with which account you want to connect to the portal. Select the one you want to use to mine liquidity and you should then be presented with the following screen:

We will start with adding liquidity to a Balancer pool. Make sure to change from Uniswap to Balancer using the top right button and select Balancer, if not already selected:

Click on the pool you want to add liquidity to, for now we choose WETH-ALBT-FRONT. Click on the plus sign next to it:

A dialog should present itself:

Here you can choose the amount of liquidity you want to add, when you provide for example any amount in WETH, the amount of ALBT and FRONT would be automatically calculated according to the correct ratio (and vice versa).

Note: in Uniswap pools it's possible to provide liquidity in regular ETH or USDT. The Balancer pools need WETH (Wrapped ETH) and USDC. ETH can be easily swapped on Balancer and Uniswap for WETH. USDT can be easily swapped for USDC on Uniswap.

Through the “MAX” buttons, you can add your complete holdings of one token to the liquidity pool. The number of other tokens needed through the correct ratio will be automatically calculated again:

Once you have settled on the number of tokens you want to add to the liquidity pool, you can press “Add Liquidity”. For some pools you need to “Approve” one or more tokens first. When this is not needed, the portal lets you skip this step, in order to save you a transaction.

After going through the approvals and finally pressing “Add Liquidity”, you will see a new dialog that repeats the information so you can confirm the numbers you have entered:

Press confirm and MetaMask will pop up asking you to review and confirm the transaction.

Note: while the transaction is pending, you will see a loading indicator on top of the screen:

After the transaction has succeeded, you will see a new kind of overview of the pool. In this overview you will see something new: “Liquidity pool tokens”:

In return for providing liquidity you receive Liquidity pool tokens (BPT) in your wallet. You can stake these tokens in order to get rewards (for example in ALBT).

Staking your BPT tokens

In order to get rewards for providing liquidity, you must stake your BPT tokens. In order to do this, simply press the stake button.

A dialog will pop up asking you how much of your Liquidity Pool tokens (BPT) you want to stake:

Simply enter the number of BPT tokens you want to stake in this dialog, or press “MAX” to stake your entire BPT token holdings at once.

In case you enter a number that’s higher than our actual holdings, you will receive a warning:

However, let’s press "MAX" instead and press the "Approve" and then "Stake" button. MetaMask will pop up again asking you to confirm the transaction. Once the transaction is completed, your view will be more interesting now:

You can now see how many tokens are going to be rewarded in total, the APY and the rewards you are able to claim so far.

Note: some of these values in these examples do not represent real world values, as these screenshots were taken from an early environment.

Additionally you have a couple of options:

  • Claim your rewards through the “Claim” button
  • Withdraw your stake using the “Withdraw” button (your reward will automatically be claimed)
  • Add more liquidity by clicking on the plus sign

You can come back to lm.allianceblock.io/ anytime to check your rewards, claim them, withdraw your stake or to add even more liquidity to increase your stake and thus your rewards. If you don’t see your stake at work when you connect to the platform, just reconnect MetaMask to the platform again, make sure it’s the wallet you have used before and make sure that in MetaMask you have selected “Main Ethereum network” and not a test network like Ropsten, Kovan or Rinkeby.

Add additional liquidity

Click on the "Add more" button or the plus sign in the pool (if visible), and you will see the same dialog as in the beginning. Repeat the steps from earlier and provide the amounts of tokens you want to add additionally in exchange for BPT tokens.

You can now stake your newly obtained additional BPT tokens for extra rewards (as before), claim your current rewards (keep on reading) or withdraw your rewards (keep on reading) in order to increase your amount of BPT tokens.

Claiming your rewards

As you can see, we are eligible to claim some ALBT and FRONT as a reward for staking our BPT tokens. So let’s press the “Claim” button. Once more, MetaMask will pop up to ask you to confirm the transaction. Good news! Once the transaction has completed, you will immediately have the rewarded tokens in your wallet!

Withdrawing your stake

If you click the “Withdraw” button, you will no longer stake your BPT tokens. Don’t worry, if you still have unclaimed tokens as reward for your staking, they will be claimed and sent to your wallet automatically, we will not leave you hanging!

Once you have clicked the “Withdraw” button, MetaMask will pop up as always, awaiting your confirmation.

After withdrawing your stake, you will see that the total amount of BPT tokens you are holding have now increased again:

Removing liquidity

Note: before removing liquidity, you need to have more than 0 BPT tokens available (unstaked). If you have 0 unstaked BPT tokens, you will first need to withdraw your staked BPT tokens using the Withdraw button (see previous chapter). This is because you can’t remove liquidity which you are currently staking; you will need to stop staking them (withdraw) first.

Once you believe you are done with staking and you want to get your tokens back from the liquidity pool, you can click “Remove”. A new dialog will appear:

You can choose the amount of BPT tokens you want to exchange for tokens from the liquidity pool. You will see how much of each token from the pool you will get back (by the default ratio of the pool):

Press “Confirm” to finalize your decision.

That's it!

About AllianceBlock

AllianceBlock is building the first globally compliant decentralized capital market. The AllianceBlock Protocol is a decentralized, blockchain-agnostic layer 2 that automates the process of converting any digital or crypto asset into a bankable product.

Incubated by three of Europe’s most prestigious incubators: Station F, L39, and Kickstart Innovation in Zurich, and led by a heavily experienced team of ex-JP Morgan, Barclays, BNP Paribas, Goldman Sachs investment bankers, and quants, AllianceBlock is on the path to disrupt the $100 trillion securities market with its state-of-the-art and globally compliant decentralized capital market.

Website | Telegram | Discord | CoinGecko | White Paper | Green Paper | Token Economics Paper

--

--

Nexera
Nexera

Written by Nexera

Nexera is empowering the future of finance with cutting-edge open-source innovation.

No responses yet