Swaap: A market-neutral AMM
Author: Kaushal

Liquidity is a crucial part of every market. It refers to the degree to which an asset can be bought or sold in the market without affecting its price. The asset is highly liquid if it can be sold easily. Otherwise, it's called an illiquid asset. You need high liquidity in the market to exchange assets with fewer risks.
Automated Market Maker
In the decentralized world, Automated Market Maker(AMM) exists to take care of liquidity and provide a platform to buy and sell assets with appropriate pricing. AMM allows traders to buy and sell assets using an algorithm that decides the price based on its availability in the market. It allows digital assets to be traded permissionless and automated using liquidity pools.
Usually, for a trade to happen, you strictly need two parties willing to exchange their assets(crypto coins, cash, etc.) at a price accepted by both. Without the other party's approval, the trade can not begin. To tackle this, liquidity pools were founded in 2016. Liquidity pools are smart contracts that allow traders to trade coins even if there are no actual buyers in the market. The trader can buy or sell an asset regardless of its prices, conditions, and availability of buyers or sellers. Liquidity pools are just a pool of assets you want to trade. So if you want to exchange ETH with bitcoins, the pool has both ETH and bitcoins with exactly a 50:50 ratio.
Liquidity Providers
For these trades to initiate, liquidity pools must initially have enough supply of both assets being traded. People can put their assets in the liquidity pool as an investment. The people who put their money or assets in the liquidity pool are called liquidity providers(LP). They get a small percentage of fees whenever a transaction is successful within the pool. That's how they normally earn profit. Similarly, if the value of the invested asset increases in the market or within the pool, they automatically book profits by that.
Impermanent Loss
But there is a catch! The profits are not always guaranteed; LP could sometimes lose their wealth by investing in liquidity pools. This is called Impermanent Loss, one of the major drawbacks of liquidity pools.
Impermanent loss is the loss you make when you have less money by investing in a liquidity pool compared to the value of the assets you would have had if you had held them in your wallet. This happens when the prices of the assets supplied by the LP start to decorrelate. For instance, if you have 100 ETH and 100 BTC within a pool and 1ETH is equivalent to 1BTC, you will face impermanent loss if the ETH price increases; suppose 1ETH becomes 2BTC.
The Swaap Protocol
Swaap is built to solve the entire problem we just explained. It is the first market neutral AMM that leverages a combination of oracles and dynamic spreads. Swaap provides sustainable yields for liquidity providers and offers traders cheaper prices, making it a win-win situation for both parties.

Let's continue with the same example. You put 100BTC and 100ETH in the pool. So 1BTC is equivalent to 1ETH at the beginning. Suppose BTC rises to 2ETH in the centralized exchanges. This would affect pool rebalancing in traditional AMMs. The pool would end up with ~70BTC and ~140ETH, and its total value would be 280ETH. In this case, Swaap would keep approximately the initial assets balance of 100BTC and 100ETH for the total value of 300ETH. Thus, Liquidity Providers are much better off.
Unlike traditional AMMs, MMM doesn't need to be rebalanced to provide liquidity at market prices and operate normally.
Swaap makes it possible to trade while maintaining the same ratio of assets through two main features: Oracle guided pricing and Dynamic & asymmetric spread.
So how does Swaap allows trading while maintaining the same ratio of underlying assets?
Oracle Guided Pricing
Oracles in the blockchain ecosystem are entities that connect blockchains to external systems. to gather data such as the market price of a token. Swaap uses oracles provided by the most secure oracles provider - Chainlink, to compute the mid price of assets traded.
The oracle based values could face errors or get attacked. Swaap uses two mechanisms to take care of this:
- Trading is paused if reserves are imbalanced by more than 2%. This prevents the extraction of large scale data by the wrong hands.
- If an oracle does not update at the set time, trading is interrupted on the platform for the related asset.
Dynamic & Asymmetric Spread
The Dynamic & asymmetric spread ensures traders can trade while keeping the pool market neutral. The pool is kept close to its initial ratio of assets to keep its market neutral.
Dynamic spread depends on volatility and inventory. Swaap computes expected volatility based on stochastic calculation and the previous price feeds. Low expected volatility means low fees and vice versa. Volatility protects the pool against frontrunning of the oracles and from selling assets that can affect an increase in price in a short period.
On the other hand, inventory deals with assets that are part of the pool. Trades that help rebalance the pool often get lower fees. This ensures that the asset distribution of the pool is close to what it was at the start.
Wrapping Up
Swaap is aiming to democratize Defi. They believe that it is better than the current centralized financial system. Their Matrix Market Maker protocol solves loopholes and drawbacks around Automated Market Maker and impermanent loss.
You can know more about Swaap on their official website or connect with them on Discord or Twitter.


Subscribe to receive Alpha!
Join 4.3k subscribers from renowned companies worldwide and get a weekly update in your inbox. Stay updated on the latest and finest projects and product updates.