🔥 How to mint TBTC and add liquidity to the TBTC/ETH pool on Uniswap: step-by-step guide 📈 💰

in #uniswap4 years ago


Today Uniswap Protocol is definitely an undisputed market leader among the new generation of DEXs. In less than two years it already has a line of significant achievements:

  • It is supported over $20 000 000 000 volume traded by over 250,000 unique addresses across 8,484 unique assets;

  • Secured over $1 000 000 000 liquidity deposited by over 49,000 unique liquidity providers (LPs), earning $56m fees in the process;

  • Emerged as foundational DeFi infrastructure, with integrations across hundreds of interfaces and applications.

Uniswap is not like an ordinary DEX we used to, it is a kind of community-driven on-chain system of smart contracts on the Ethereum blockchain, implementing an automated liquidity protocol based on a “constant product formula”. You definitely should learn more about it if you haven't yet. The whitepaper can be found: here.

When most of exchanges have an order book to match users' demand and propositions, Uniswap uses a system of smart-contracts, where every trading pair has its own contract which is storing corresponding reserves of every asset. And all trades on Uniswap are executed directly against such reserves. Also, these reserves are filled by the liquidity providers (LPs), that deposit trading assets to the existing smart-contracts and earn trading fees, depending on a pool share they provided. Everyone can deploy a trading contract for any ERC20/ETH or ERC20/ERC20 pair he is willing to, and add liquidity to it. So be very careful when trading on such type of DEXs, scammers are everywhere.

The Uniswap system is a completely trustless, community-driven, and highly decentralized financial infrastructure that is giving access for anyone in the world to financial services without any kind of discrimination or counterparty risk.

And its success, achieved without even the involvement of the core development team since deployment, indicates that there is exists a significant demand for permissionless financial services on the market. And damn, you definitely have it when using Uniswap.

Every time a user making a swap he is paying a 0.3% fee of the transaction amount. Thereafter this 0.3% is divided among all liquidity providers in the pool, according to everyone's share. And herein I will teach you how to add liquidity to the TBTC/ETH pool on Uniswap and earn a part of pool fees.

But, at first, we need to obtain a TBTC token, a fully Bitcoin-backed ERC-20 token pegged to the supply of BTC. To do this we will use a fully trustless and decentralized bridge between BTC and ETH that is called tBTC dApp by Keep Network.

So... Go...

Open the dApp page: dapp.tbtc.network, press "Deposit" and connect with Metamask extension. I hope you already have Metamask, otherwise you can get it from metamask.io or your browser store.

Снимок экрана 2020-10-22 в 20.52.37.png

Снимок экрана 2020-10-22 в 20.52.58.png

Choose a "lot" size. I will mint 0.1 TBTC that is equal to 0.1 BTC.

Снимок экрана 2020-10-22 в 20.55.27.png

After the lot is chosen, hit the "Create Address" button.

Снимок экрана 2020-10-22 в 20.55.42.png

After this, you will need to confirm the interaction with the smart-contract by pressing "Confirm". Note that you're now paying a fee, so you need to have enough ETH on the balance to perform the mint. The next fees will be a lot less, so don't worry about this.

Снимок экрана 2020-10-22 в 21.00.29.png

The minting process is launched and the Random Beacon - the core Keep Network dApp, is choosing a signing group for my deposit from the general pool of nodes. These signers will be putting their ETHs as collateral at a rate of 150% of my BTC they are going to store, and this makes the process completely trustless.

Снимок экрана 2020-10-22 в 21.05.48.png

After the transaction confirmed we started getting the BTC deposit address, that is being generated by the signing group. By the way, none of them has full access to the BTC they store, each of them owns only a share of the private key to my BTC.

Снимок экрана 2020-10-22 в 21.11.17.png

Another one smart-contract interaction requires confirmation...

Снимок экрана 2020-10-22 в 21.14.17.png

And we got an address.

Снимок экрана 2020-10-22 в 21.16.52.png

!!! Note that you need to pay the exact lot sum to prevent losing your funds !!!

So, copy the address and go to your BTC wallet, where you storing your funds, to initiate the BTC transaction.

Снимок экрана 2020-10-22 в 21.17.24.png

I'm using blockchain.com here.

Снимок экрана 2020-10-22 в 21.26.03.png

Carefully check all the transaction details once again and confirm if everything is ok.

Снимок экрана 2020-10-22 в 21.29.56.png

When the BTC is sent we need to get 6 block confirmations to continue the minting, so please, be patient and wait.

Снимок экрана 2020-10-22 в 21.37.17.png

When we finally got all required confirmations we need to send the proof to the ETH sidechain to receive TBTC.

Снимок экрана 2020-10-22 в 22.24.24.png

And allow the dApp to spent our TDT, NFT token that we obtained when initiated the deposit.

Снимок экрана 2020-10-22 в 22.26.29.png

Then signing another one contract interaction...

Снимок экрана 2020-10-22 в 22.32.24.png

And we did it! Now we have our TBTC token on the balance.

Снимок экрана 2020-10-22 в 22.36.15.png

Снимок экрана 2020-10-22 в 22.39.39.png

If you minted TBTC but don't see it in your Metamask wallet don't worry, you just need to add a custom token by the contract number.

The TBTC contract address is:

Снимок экрана 2020-10-22 в 22.43.15.png

To see a full list of tBTC mainnet contracts go here.

And, most of the way is already behind. Everything was pretty simple, isn't it?

The next step requires interaction with the Uniswap dApp. Also via the Metamask extension, so there shouldn't be a problem.

So... Go to the Uniswap dApp and then to the "Pool" tab. You also can ensure that you're going to the right place by finding the TBTC token on coingecko, check the markets tab, and follow the link to the Uniswap page from there.

Снимок экрана 2020-10-23 в 14.03.29.png

Снимок экрана 2020-10-23 в 14.03.44.png

Here you can see the information about the 0.3% fee that was mentioned above, so I will not stop on it now. When you got here you need to press the "Add liquidity" button and choose the token you are willing to add or simply add it by the contract number.

Снимок экрана 2020-10-23 в 14.12.20.png

Снимок экрана 2020-10-23 в 14.13.38.png

Снимок экрана 2020-10-23 в 14.16.39.png

Check the contract number once again.

Снимок экрана 2020-10-23 в 14.17.18.png

And hit "add".

Снимок экрана 2020-10-23 в 14.17.45.png

Enter the amount of TBTC you want to add or simply hit "Max" if you want to add all your TBTC that is on your balance.

Снимок экрана 2020-10-23 в 14.18.17.png

The important nuance is when you adding liquidity to the trading pair on Uniswap you must add to the reserves equal shares of both assets, so you need to have the same equivalent in ETH on your balance. The amount of it, most likely, will already be calculated and auto-filled by the dApp. You also can already see the TBTC/ETH exchanging rate, and your share in the pool. So check all the details carefully once again and hit the "Approve TBTC" if everything is ok.

Снимок экрана 2020-10-23 в 14.22.57.png

After this, we need to allow Uniswap dApp to spent our TBTC token by signing a transaction in Metamask.

Снимок экрана 2020-10-23 в 14.36.02.png

Wait till the transaction confirmed, it may take a while as in my case, but don't worry about this. Then hit "Supply", check all the details once again and "Confirm Supply".

Снимок экрана 2020-10-23 в 14.42.14.png

Снимок экрана 2020-10-23 в 14.45.01.png

You will also need to sign the ETH transaction in Metamask.

Снимок экрана 2020-10-23 в 14.45.38.png

And it is done ✔️ You have successfully added liquidity to the TBTC/ETH pair on Uniswap and started to earn your share of trading fees.

Снимок экрана 2020-10-23 в 14.48.19.png

Also, you can check this transaction via Etherscan.

Снимок экрана 2020-10-23 в 14.47.46.png

Tracking your liquidity is also available under the "Pool" tab. And under the same tab this liquidity can be removed, along with earned fees.

Снимок экрана 2020-10-23 в 14.56.34.png

To do this (remove liquidity) you just need to hit the "Remove" button > Select the amount of liquidity to remove that you wish to withdraw > Confirm the removal > Confirm the transaction > Proceed with a final confirmation.

Снимок экрана 2020-10-23 в 14.59.35.png

As you could notice, adding liquidity is a pretty simple process that allows you to earn by being an active member of the Ethereum DeFi ecosystem. And the TBTC itself was designed exactly for such goals, to allow BTC holders to benefit from DeFi on Ethereum without spending their Bitcoin. Because 1 TBTC will always cost 1 BTC when you redeeming it back via the tBTC dApp.

Check official Keep and tBTC links once again and hit me in Discord if you have any questions or suggestions, I'm alterkahn#1033 there.

Keep Network website, tBTC website, tBTC dApp, tBTC Yellow Paper, Keep Network GitHub, Messari transparency page, Keep Blog, Staking documentation, tBTC mainnet contract on Etherscan, KEEP on CoinGecko, Keep Twitter, tBTC Twitter, Telegram, Reddit, Keep Discord, tBTC Discord.


Cool guide, thanks!
But I think I will move my liquidity to curve.fi, heard Keep will soon pay rewards for the liquidity there. Is it true?

yep, it looks like they're going to start incentivizing from there, but it doesn't mean that they will not do this for Uniswap pools.

What would you advise? Wait and divide my liquidity between different pools? 🤔

No need to wait, you can put your liquidity to the uniswap now to earn fees and remove it partially when find something more worthy. Afaik KEEP rewards contract is not yet deployed, so catch the moment.

Thank you so much for the guide. This is what I need. Respect!

Great thanks for your warm words, this is the best reward for my work 😊

Coin Marketplace

STEEM 0.23
TRX 0.12
JST 0.029
BTC 66099.02
ETH 3560.98
USDT 1.00
SBD 3.16