Getting started with DeFi on Internet Computer : Sonic

Hyuna Kim
Getting started with DeFi on Internet Computer : Sonic
Table of Contents
Table of Contents

The arrival of DeFi on the Internet Computer has been highly awaited by IC enthusiasts, both staked investors and traders alike. DeFi deployment is the most common path of user acquisition in crypto, meaning we’re likely to witness increased growth of the larger IC ecosystem as a result. While DeFi covers a wide breadth of decentralized, permissionless solutions to the traditional financial system, its most recognized utilization is in peer-to-peer trading and yield farming.

Many established blockchains already host small economies where developers can launch their own tokens, which are then bought and sold by interested parties. Ethereum is currently the most popular platform but suffers from slow speeds and high, sometimes wildly pendulous gas fees. Others have sought to improve upon Ethereum’s shortcomings to varying degrees of success.

However, the Internet Computer Protocol holds a distinct advantage above those blockchains thanks to its speed and unique reverse gas model. This means DeFi will not only be faster on the Internet Computer but that users won’t have to worry about paying fluctuating gas fees to complete their transactions.

Don’t Want to Read? Watch Our Video Tutorial Instead

Sonic : The Only Web 3.0 DEX That You Need

There are several notable DeFi projects in development within the DFINITY network. Among them is Sonic, the first DEX, and AMM on the Internet Computer. Sonic aims to become the premier DeFi hub for the IC community by providing swap and liquidity services with secure, lightning-fast transactions for cheap. Sonic’s transactions are gasless, thanks to the Internet Computer’s reverse gas model; users only have to pay a 0.3% swap fee, plus a negligible network fee that costs mere fractions of a cent to update calls on canisters of tokens.

In line with the spirit of web3, Sonic’s vision is heavily focused on user governance and autonomy. The Token Launchpad, DAO, and issuance of a governance token are all upcoming milestones that Sonic’s team hopes will help transfer control back to the Sonic community.

Sonic v2’s main feature will be the Token Launchpad, which will allow devs to create and issue custom DIP20 tokens through Sonic directly. Though new tokens will be vetted manually by the Sonic team at first, the goal is to have a system in place to automatically allow user-contributed assets while filtering out malicious actors. Additionally, token imports in the future will leverage’s Token Registry in order to support non-DIP20 tokens, using DAB’s standard-agnostic wrappers. DAB-imported tokens will be signified with a “verified” status to further improve the safety of Sonic users.

Aside from the Token Launchpad, Sonic hopes to help speed along development of the larger ICP DeFi ecosystem via its open API and Javascript library (Sonic-js), currently in open beta so that more developers can code with ease.

The upcoming Sonic DAO and $SONIC governance token will help create a community that is self-governing as well as sustainable. The community will always be at the center of Sonic, which is why only 5% of $SONIC’s supply will be available via public sale. 75% of the total supply will be reserved for community members who helped drive growth, whether in the form of adding liquidity, by being an active participant in Sonic social channels, or by engaging in Sonic’s open-source code.

The allocated 75% of $SONIC tokens will be distributed via airdrops, an ecosystem fund, and liquidity incentives. This makes it a great time to start testing Sonic’s available functions for token swapping and learning how to use its liquidity pools as developers get building. You could be in for a very pleasant surprise in the near future!

A Look Under the Hood

Sonic currently supports three tokens: ICP, WICP (Wrapped ICP), and XTC (Cycles).

Please note, XTC can be acquired through 2 different methods, minting and swapping on Sonic. Due to the supply ratio in liquidity pools, there may be occasional price differences between minting (ICP/XTC) and swapping (WICP/XTC). The supply ratio will stabilize as the liquidity pools grow but for now, be mindful of possible price discrepancies between the two pairings.

XTC can be minted using DFX (Dfinity’s Software Development Kit) or by swapping ICP for XTC in Sonic, which automatically burns ICP for Cycles.

Sonic : Swap Tab


1. Connect your Plug wallet by selecting the button in the top right corner. Sonic’s UI is intuitive and should feel familiar if you’ve used DEXes on other blockchains.

You can swap tokens using your available balance on Sonic, your Plug wallet, or both. Sonic automatically uses the tokens in your Sonic balance first; any difference will be made up by your Plug balance. If this is your first time using Sonic, you will automatically use your Plug balance.

2. Navigate to the Swap page, then pick your desired pair. The default setting is for the top token to be exchanged for the bottom token. The direction of the arrow can be changed at any time by clicking on it. The arrow points in the direction of the token being gained.

3. Enter the amount of either token you want to swap. Entering one value will automatically calculate the amount of the other token.

4. Set a slippage tolerance. Click on the gear icon under the Swap header to access Transaction Settings.

Slippage tolerance indicates how big of a percentage change you are willing to accept when swapping coins, to accommodate for available assets in a liquidity pool. Too low of a slippage tolerance may mean that the swap will fail!

5. Review & Complete.

Sonic : Swap Function

Look over your swap details.

You can select the checkbox above the Swap button if you want to keep tokens in your Sonic balance. Keeping a balance on Sonic is ideal for high-frequency trading as it’s several seconds faster than using your Plug balance.

Click the “Review Swap” button, do a final review, then click “Confirm Swap.” Sonic will communicate with Plug for transaction approval—this is your last chance to review your swap! Click confirm when you’re ready, and the swap will initiate. This may take a few moments to finalize. Once completed, you’ll see a notification of your successful swap.

Sonic - Swap Function Progress

How to Add Liquidity

1. Head to the Liquidity page and select “Create Position.”

2. Select the token pair of the liquidity pool you want to join. You will need both tokens to participate.

3. Enter the desired amount of either one of the token pairing, and Sonic will automatically calculate the amount of the corresponding token. Liquidity is added in a ratio that satisfies current market prices.

4. Click the “Review Supply” button to see how many LP tokens you’ll receive in exchange for adding your pair to the liquidity pool.

LP tokens are your proof of ownership in the liquidity pool while it uses your tokens to provide liquidity to other users; think of them as IOU slips. You will use LP tokens to remove your original token pair out of the pool.

Sonic - Liquidity Function

5. Click “Confirm Supply,” and Sonic will communicate with Plug for transaction approval. Once the transaction is approved, congratulations, you’ve just provided to a liquidity pool!

Sonic - Liquidity Function Progress

As a liquidity provider, you will earn a share of the 0.3% fee that Sonic users pay for each swap that they make. How much you earn will be proportional to your stake in a particular liquidity pool.

Sonic - LP tokens

How to Remove Liquidity

TO REMOVE, head over to the Liquidity page again. There you’ll see any liquidity positions you currently hold.

Select the minus sign next to the pool you want to exit, and you will be prompted with how much liquidity you want to remove. Enter the amount you wish to withdraw, then click the “Remove” button.

Sonic - Remove Liquidity

Sonic will prompt a batch transaction from Plug. Once approved, your LP tokens will be burned, and the associated amount of the two tokens that make up the liquidity pool will be transferred to your balance.

Any rewards you’ve earned while participating in the pool will automatically be redeemed into your balance. There are no extra steps needed to claim any accrued fees.

Note: If you are unfamiliar with yield farming and how liquidity pools work, please be mindful of impermanent loss.

Connect With Us:

Twitter | Telegram | Instagram | Facebook | Email

  • Disclaimer: The views and opinions expressed on this website are solely those of the original author and other contributors. These views and opinions do not necessarily represent those of the Dfinity Community staff and/or any/all contributors to this site.

Comments are for members only. Join the conversation by subscribing 👇.

Great! Check your inbox and click the link
Great! Next, complete checkout for full access to CoinHustle
Welcome back! You've successfully signed in
You've successfully subscribed to CoinHustle
Success! Your account is fully activated, you now have access to all content
Success! Your billing info has been updated
Your billing was not updated