TON Swap: the Yield Farming Guide
Welcome to the official guide for yield farming at tonswap.io created by the Broxus team. You will learn how to farm as with Uniswap LP tokens, so with the native LP tokens produced by the TON Swap platform.
First thing first, let us explain some terminology.
Pool - Exchange pool created by providing liquidity for both sides of the deal. It is a particular smart contract that allows you to get the rate and perform the exchange.
Vault - A dedicated smart contract where all tokens deposited to the dex are kept securely in a secure way.
Account - This is your personal smart contract that is needed to provide liquidity to the pool.
Swap - Exchange operation.
Farming pool - A special smart contract that distributes the provided amount proportionally to everyone who staked a specific LP token at this contract.
Crystal Wallet - A Chrome browser extension that acts as your personal wallet and TON transport for the dApp.
That’s it. Pretty easy, isn’t it?
Install Crystal Wallet for Google Chrome and restore your wallet with the seed phrase. If you used Crystal Wallet for desktop with 24-word-seed before, choose the WalletV3 type of wallet.
After that, click “Select assets” and select all that you had.
If you don’t see some on the screen, no worries: you can add them manually by inputting the address of the root token contract.
TON Swap and TON Bridge evolve very fast. It means that we need to upgrade token standards and smart contracts used in our applications from time to time.
If you are familiar with the first version of the farming pool that you used some time ago, you probably have some Uniswap LP tokens, as well as WTON tokens.
TON Swap will take care of you - the first time you connect your Crystal Wallet to the website, it will scan your account for an old version of tokens and propose to upgrade them.
Once you click “Upgrade,” TON Swap will ask you to confirm it through the Crystal Wallet. You will need few TONs to pay network gas fees.
After that, please be patient - in few seconds, you will get the upgraded version of your tokens.
If you don’t see them after a while, check that you enabled the tokens in the Assets section.
TON Swap operates only with the Wrapped TON. Please do not send your regular TONs to pool addresses - you will simply lose them.
Instead, send your TONs to the smart contract address below (WTON Vault) with one more TON attached as a gas, and in a while, you will get your WTONs added to your wallet.
If you do this for the first time, it may take a bit longer to deploy your personal WTON contract.
Use TON Bridge to get the second part of the pool equation (we mean Ethereum tokens). You can find the detailed manual on how to do this in our knowledge base.
It is the most complex part; please be attentive.
Go to the Pools section and follow the instructions.
Well, that’s obvious: choose the tokens you want to provide.
For the first time, if you haven’t created an account before, TON Swap will ask you to do so.
It will deploy the contract through Crystal Wallet - you just need to confirm the transaction and pay the network gas fee.
Now you need to establish the connection between your account and the pool. The same algorithm: click “Connect”, confirm the transaction in Crystal Wallet, wait for a while until it finishes.
Some people report that the spinner rolls for a long time - it is safe to refresh the page and select the pool again. You will not need to pay twice.
Input the amount of both tokens that you are going to provide. Please pay attention that it may affect the exchange rate.
Once you input the first amount, TON Swap will automatically adjust the second amount according to the current exchange rate.
However, there’s an option to provide only one part of the pair. In that case, TON Swap will automagically perform the exchange in the background to get the necessary amount of the second token.
Now is the small peculiarity: you need to transfer your tokens to your account. If you don’t have enough balance on your account, TON Swap will prepare the transfer and will ask you to confirm it in Crystal Wallet, separately for each token (like it is shown on the screen below).
Once the balance on the account is sufficient, the system will allow you to supply liquidity by pressing the button name… “Supply,” of course.
After you’ve done everything, you will get the Supply receipt - the confirmation of successful liquidity provision specifying the amount of LP tokens you got in return.
LP tokens reside on your account, do you remember? That means you need to withdraw them first before you can stake’em in the farming contract.
Go to the pool page, scroll down, tap the arrow next to the word “LP tokens”, and confirm the transaction.
Go to the Farming section of TON Swap and click on the right icon next to the corresponding farming pool name.
Now’s the easiest part: input the amount of LP tokens you want to stake in the farming pool and confirm the transaction via Crystal Wallet. In a while, you will see that your share in this pool has changed.
To get back your staked liquidity, just follow these steps in reverse order