Site iconSite icon ForkLog

BotSwap: Fetch.ai app that simplifies trading on Uniswap and PancakeSwap

BotSwap: Fetch.ai app that simplifies trading on Uniswap and PancakeSwap

In December, trading volume on decentralized exchanges (Decentralized Exchanges, DEX) surpassed $127 billion. The Total Value Locked (TVL) at the largest of them — Uniswap and PancakeSwap — amounted to $6.18 billion and $4.1 billion respectively.

We feature BotSwap, an app that helps optimize activity on these trading platforms.

BotSwap in Brief

The app is developed by the British blockchain startup Fetch.ai — the creator of the eponymous platform with the ERC-20 token FET.

In February 2019, Fetch.ai raised $6 million in 22 seconds via an IEO on Binance Launchpad. In March 2021 the company launched the derivatives DEX Mettalex, and three months later — the first version of BotSwap.

BotSwap automatically withdraws liquidity from Uniswap V2 or PancakeSwap V2 pools when the asset price reaches a certain level. This helps cap impermanent loss — the difference in the value of assets held in a wallet and in the liquidity pool.

Additionally, BotSwap users can create limit orders for trading pairs: the app will swap tokens when the price hits the set level.

Agents and Triggers

Users create DeFi agents — subaccounts that perform actions on the exchange. They trigger when certain conditions are met — triggers.

BotSwap allows creating up to five agents. Each can have only one trigger connected to it.

The cost of operating one agent is 30 FET per month ($10 at the time of publication). BotSwap users receive 5 bonus tokens, which can be spent on these goals.

As of publication, BotSwap offers two triggers:

To use BotSwap you will need:

We tested the app on Binance Smart Chain: created an agent and two triggers — for liquidity withdrawal from the pool and token swaps on PancakeSwap.

Creating a DeFi Agent

To add an agent, go to the BotSwap app and connect MetaMask. Then open the Dashboard menu and click Add Agent. This can also be done in the Agents tab.

Click the Create button in the window that opens. Leave the default values in the fields: the network can be changed later when configuring the agent.

The DeFi agent appeared in the Agents tab.

The app automatically generated the DeFi agent identifier — zero-knowledge-performer. It can be changed by clicking the agent’s name.

Withdrawing Liquidity

Created a trigger to withdraw liquidity from the anyMTLX/BUSD pool on PancakeSwap. To do this, went to the Triggers tab and clicked New Trigger.

Selected Withdraw Liquidity in the opened window and clicked Next.

We did not change the network and linked the trigger to the agent zero-knowledge-performer. Again clicked Next.

Specified the pool address for anyMTLX/BUSD on PancakeSwap.

The app automatically identified 7 LP tokens — our share in the anyMTLX/BUSD pool.

Set the price at which the agent will withdraw liquidity — 1.40 anyMTLX/BUSD.

For paying the operation, we chose the slow fee of 10 Gwei. In this window you can set a higher fee or specify another value in the Custom field.

After setting parameters, clicked Next.

Confirmed the setup in MetaMask:

After clicking Next, the trigger appeared in the Triggers tab.

BotSwap does not allow editing triggers. To change the parameters, you must delete and create a new trigger.

Exchanging Tokens

Most recently, tested the trigger for exchanging WBNB and BUSD tokens.

For this, created a new agent — innovative-crypto-bot — following the instructions above. Then went to the Triggers tab, selected Swap Token Trigger, and clicked Next.

Linked the trigger to the agent innovative-crypto-bot for the trigger. Left the value BSC Mainnet in the Network field and clicked Next.

Selected the token BNB and the stablecoin BUSD as assets to swap. In the Amount field, entered 0.02 BNB and clicked Next.

Set the trigger — the price at which the agent will swap 0.02 BNB for BUSD. Chose the fee for the swap transaction and pressed Next.

When creating the trigger, BotSwap automatically wrapped BNB into Wrapped BNB (WBNB). The app then asked to confirm trigger installation in MetaMask. We approved:

After this, the Swap trigger appeared in the Triggers tab.

An instruction for working with BotSwap on Ethereum is available on Fetch.ai’s YouTube channel.

https://youtu.be/fLIaMZXBhsU

Future of the Project

In the near term, the Fetch.ai team will add support for DeFi protocols SushiSwap and 1inch, as well as new triggers:

Additionally, Fetch.ai developers are considering integrating BotSwap with the DeFi asset management platform Zapper.

Conclusion

BotSwap — a minimalist app that simplifies working with popular decentralized exchanges Uniswap and PancakeSwap. Its users automatically swap tokens and withdraw liquidity from pools.

The only drawback of BotSwap is its modest set of triggers. However, Fetch.ai launched it just four months ago and is already working on expanding its functionality.

Read ForkLog’s bitcoin news in our Telegram — cryptocurrency news, rates and analytics.

Exit mobile version