At the core of the NeuraSwap platform is our decentralized exchange (DEX). Our DEX allows users to swap nearly any tokens on GPT Chain (coming soon: BNB Chain, Polygon, Ethereum, and Arbitrum)
Users can also add liquidity to the NeuraSwap DEX to earn passive income on tokens they hold via trading fees in the form of liquidity provider tokens (AI-LPs).
Unlike centralized exchanges, which use third-party intermediaries like market makers to facilitate trading between tokens, decentralized exchanges use smart contracts to coordinate trades between users. This allows for permissionless and anonymous trading free of the constraints of centralized exchanges.
In a decentralized exchange like NeuraSwap's DEX, all liquidity is added by users and partner projects. To incentivize deeper liquidity, a decentralized exchange can offer reward tokens to liquidity providers, as well as a share of trading fees earned from trades from a token pair. A token cannot be traded for another token on the NeuraSwap DEX unless there is ample liquidity depth in the exchange for that token pair.
For example, let's say a project launched the "PROJ" token on GPT Chain, but did not add any GPT-PROJ (or any other [TOKEN]-PROJ combination) liquidity to the NeuraSwap DEX. In this example, a user would not be able to swap into the PROJ token with any other assets, because there is no liquidity on the DEX to swap with. It is impossible to push GPT into a liquidity pool and pull out PROJ, because there are no PROJ tokens on the NeuraSwap DEX.
This is why a DEX must maintain sufficient liquidity for all token pairs that it offers for trading. Traders can also run into issues with price impact and slippage if there is insufficient liquidity for a particular token pair.
NeuraSwap typically recommends having at least $150,000 of liquidity for a trading pair to operate effectively on our DEX. Using the same example, the new project would need to add $75,000 of GPT and $75,000 of PROJ to the NeuraSwap DEX in order to be listed.
Confused? Head back to the AiFi Glossary.
NeuraSwap's decentralized exchange (DEX) allows users to swap between AI tokens in the most efficient way possible. This is incredibly useful for providing tokenized AI data access to AI agents in a permissionless way.
Read below to learn the basics of swapping, or continue to the How to Swap page to for instructions on use the NeuraSwap DEX to swap tokens.
Swapping tokens is one of the most fundamental functions of an AiFi DEX. Decentralized exchanges like the NeuraSwap DEX allow users to send their AI tokens into the protocol and receive as close to an equal value of another token as possible, after accounting for transaction fees, slippage, and price impact.
In the world of AiFi, smart contracts dictate each step of a swap transaction, with no human or centralized intermediaries involved. This gives users several advantages relative to traditional or centralized currency exchanges, including:
Fast transaction speeds
Permissionless trading
Flexibility and access to a wide variety of tokens
Markets that are always open
Most importantly, swapping between tokens allows users to take advantage of unique opportunities within AiFi. For example:
A user who wants to buy a protocol utility token, like NEU, can use the NeuraSwap DEX to swap it with an existing token, such as the GPT Chain protocol token ($GPT) or a stablecoin ($USDC). The user now has a utility token which they can hold, stake to earn rewards, or convert back to NEU to participate in governance.
A user who is interested in supporting a particular AI project on GPT Chain can use the NeuraSwap DEX to buy a listed project's token with NEU, USDC, or any other of the tokens listed on the DEX. At any time, they are free to swap tokens at fast speeds without the permission of an intermediary.
A user who wants to consolidate AI tokens into stablecoins to add stability to their portfolio can use the NeuraSwap DEX to trade their project tokens for USDC or any other listed stablecoins at any time, for any reason, without requesting permission from a centralized source.
Trading Fees
NeuraSwap collects a Routing Fee of every time users swap tokens on the exchange. The Routing Fee averages 0.2% of the value of the trade. Occasionally, an LP fee will also be included, depending on how the trade is routed. A portion of the fees goes to the NeuraSwap Treasury, and a portion is distributed to liquidity providers.
Slippage
While AI token swaps do occur at very fast speeds on the blockchain, there can still be a (usually small) difference between the price you see when a user submits a swap transaction, and the price that applies when the transaction is recorded on the blockchain. This difference in prices is called "slippage".
When users submit a swap on the NeuraSwap DEX, they select a "slippage tolerance" amount, which is the pricing difference that the user are willing to accept while the trade is executing. While slippage tolerance normally ranges between 0.10% and 1.00%, the default slippage tolerance is 0.50%. However, if the price difference between submission and confirmation of the trade exceeds that amount, the trade will fail. Users can increase the slippage far beyond the default of 0.50% if they choose, but must be careful to note that may have a significant impact on the amount of tokens they receive in return. The Minimum Received line will provide an estimate of the slippage impact of their trade.
If the AI token a user is trading has a reflect fee, then the slippage tolerance will need to meet or exceed the reflect fee percentage for the trade to succeed.
Price Impact
Slippage occurs not only from the change in prices from other user's trades, but also from the trade submitted by an individual user. This is called "price impact", and it's expressed in percentage at the bottom of the swap module. If slippage tolerance is below the price impact of the trade, the trade will fail.
Price impact is dictated by the constant product formula.
Continue to the How To Swap page to learn how to trade on ApeSwap's DEX.
Follow the steps below to complete a trade on the NeuraSwap DEX:
Connect your wallet to NeuraSwap (for instructions, visit the How to Connect Your Wallet page).
Select the AI tokens you wish to trade by clicking on the token icons and selecting from the dropdown list. If you are attempting to trade a token for the first time, you will need to approve the token contract within your wallet using the Enable button before trading.
Enter the amount of the token you’d like to trade for, or receive. The exchange will pre-fill the other amount like the image below.
Check the details to ensure the values are accurate, and click “Approve GPT Router”.
Metamask will pop up and ask you to sign the transaction by clicking "Confirm".
Now the button will go from "Approve GPT Router" > "Swap". Once you see the button text change then click the "Swap" button.
A popup will show up and will ask you to press the button "Confirm Swap".
Now your Metamask wallet will show up and ask you to "Confirm" the transaction.
Once confirmed, you'll be able to view your transaction on the GPT Explorer by clicking "View on Explorer" or close the popup.
If successful, the swap should be reflected in your wallet's token balances shortly after.
In addition to swapping tokens, NeuraSwap users can also add liquidity to the DEX itself by contributing equal amounts of two tokens (a token pair) to create liquidity provider (LP) tokens.
Liquidity pools are created by pairing together two different crypto tokens and depositing them into a smart contract. NeuraSwap currently uses the constant product formula for our automated market market (AMM) and liquidity pools, ensuring that assets are always deposited in an equal 50/50 split based on the current value of those assets, and that all liquidity pools only ever have two tokens in them.
Liquidity pools are often referred to as "trading pairs," because you are combining two tokens to create a liquidity provider token. A liquidity pool of two assets allows you to swap (trade) between those two tokens.
Additionally, if you want to dig deeper on the math behind our AMM (the constant product formula) check out Binance's walkthrough here.
Creating Liquidity Provider Tokens
A liquidity provider token (aka "LP token") is essentially a receipt that a protocol provides to a user who adds liquidity to a decentralized exchange. NeuraSwap allows you to provide liquidity by adding your token pairs to liquidity pools, using equal amounts for each token.
When you add your tokens to a liquidity pool, you will receive AI-LPs - NeuraSwap's native liquidity provider tokens.
For example: if you deposited NEU and GPT into a liquidity pool, you would receive NEU-GPT AI-LP tokens.
The number of AI-LP tokens you receive represents your portion of the NEU-GPT liquidity pool. You can also redeem your funds at any time by removing your liquidity, but please be conscious of impermanent loss.
Liquidity Provider Benefits
There are two main ways that you can earn rewards after adding liquidity. As soon as a user creates an AI-LP token and holds it in their wallet, they begin collecting trading fees (aka Liquidity Mining). When transactions occur on the DEX that involve the tokens represented by a particular AI-LP token, fees collected on those transactions are distributed proportionally among the holders of the applicable LP tokens.
Liquidity Mining
Any time someone swaps between a token pair on NeuraSwap’s DEX that is routed through AI LPs, a 0.20% trading fee is collected.
For trades on GPT Chain: Of the 0.20% trading fee, 0.05% goes to the NeuraSwap Treasury, and the remaining 0.15% is distributed proportionally to all holders of the applicable AI-LP token.
Keep in mind that theses trading fees are only distributed to V3 token holders when the relative token price is within the price range that they set when setting up the position.
Impermanent Loss
Providing liquidity is not without risk, as you may be exposed to impermanent loss. “Simply put, impermanent loss is the difference between holding tokens in an AMM and holding them in your wallet.” - Nate Hindman
Check out Binance Academy's detailed walkthrough on impermanent loss to learn more:
Continue to the How to Add Liquidity page for a detailed walkthrough.
Follow the steps below to add liquidity on the NeuraSwap DEX:
Connect your wallet to NeuraSwap (for instructions, visit the How to Connect Your Wallet page).
Click on the "Liquidity Tab" and click the "+Add" tab.
Now select the AI tokens you wish to create a trading pair of by clicking on the token icons and selecting from the dropdown list. Do the same for both the top and bottom token dropdown lists.
Enter a token amount on one of the lines. The other line will be automatically calculated for you to keep the pair amounts equal.
Click "Add Liquidity" and validate the transaction in your wallet.
A popup will now appear. Click "Confirm Liquidity" and validate the transaction in your wallet.
Once confirmed, you'll be able to view your transaction on the GPT Explorer by clicking "View on Explorer" or close the popup.
8. If successful, the added liquidity should be reflected in the "Positions" tab shortly after.
9. If you click the pair, you will see that it drops down and you have the ability to "Add" or "Remove" liquidity from the pool.