HydraSwap- Redefining the DEX on Solana.

𝓨𝓪𝓼𝓱
8 min readNov 25, 2021

Hydraswap is a cross-chain advanced DEX on Solana, an automated market maker that brings concentrated liquidity to Solana. By bringing a smart pricing algorithm on Solana Hydra Market Maker (HMM) minimizes LP’s exposure to impermanent loss and maximizes their returns. Hence increasing the efficiency of capital for the LP providers.

Why Solana?

Until 2021, the Majority of the DeFi products were being built on Ethereum Blockchain, However, there is a huge gas fee involved in each and every transaction you make on ethereum due to proof of work. So, Many users are feeling the gas fee is high and they were looking for some similar blockchain to use DeFi products which cost less gas fee. In the same way, as developers considering the aspects of users(customers) they started to build the DeFi products on Solana which runs on a proof of history consensus. As compared to Ethereum, Solana has a much higher transaction rate and very little gas fee. So interests in people and developers are slowly shifting on to Solana.

What is AMM (Automated Market Maker):

Automated market makers (AMMs) are part of the decentralized finance (DeFi) ecosystem. They allow digital assets to be traded in a permissionless and automatic way by using liquidity pools rather than a traditional market of buyers and sellers. AMM users supply liquidity pools with crypto tokens, whose prices are determined by a constant mathematical formula. Liquidity pools can be optimized for different purposes, and are proving to be an important instrument in the DeFi ecosystem.

Liquidity pools and Benefits of Liquidity providers:

Liquidity refers to how easily one asset can be converted into another asset, often a fiat currency, without affecting its market price. Before AMMs came into play, liquidity was a challenge for decentralized exchanges(DEXs) on Ethereum. As a new technology with a complicated interface, the number of buyers and sellers was small, which meant it was difficult to find enough people willing to trade regularly. AMMs fix this problem of limited liquidity by creating liquidity pools and offering liquidity providers the incentive to supply these pools with assets. The more assets in a pool and the more liquidity the pool has, the easier trading becomes on decentralized exchanges. Liquidity providers also get trading fees corresponding to the ratio of the pool they own. Every time a user buys/sells a token in the pool he gets the percentage trading fees. In this way, liquidity providers will earn and the AMM protocols have enough liquidity. Here is a win-win situation.

What is the problem with the constant function AMM’S:

The Liquidity pools generally work on the formula called “Constant Product formula”

Known by X(amount of token in LP) * Y(amount of token in LP) = K

Prices are given by ratios of lp in the pools. Here AMM is designed in such a way that K should remain constant so that there won’t be heavy fluctuations in the price if someone sells or buys.

The constant, represented by “k” means there is a constant balance of assets that determines the price of tokens in a liquidity pool.

Let’s say there is a Sol-USDC pool if someone buys the Sol, the price of sol increases along the smooth curve, and conversely, if some sell the sol the price of sol gets down smoothly along the curve does not lead to drastic changes due to constant function market maker.

But, Whenever there is a token imbalance in the pool than that of the beginning ratio, the Price will move down/up based on the token in the pool increased/decreased. This gives arbitrageurs a chance to earn some profits through buys/sells and hence they help to readjust the tokens in the pool and help to maintain the proper balancing of tokens and price.

In this process of rebalancing tokens in the pool, the LPs are facing the huge risk of impermanent loss. In the process of normal CPMM rebalancing of tokens there will be a heavy wash out of LP’s tokens from the pool and hence results in impermanent losses. In the same way, LPs can gain huge fees when the price is sticking around a stable price range. So during the highly volatile price ranges traders will show interest to remove the liquidity from AMM due avoid the impermanent loss in the rebalancing of tokens.

Problems that are drawn from the above statement:

  1. LPs have a higher risk of impermanent loss in volatile markets due to token rebalancing.
  2. LPs are more likely to remove the liquidity in volatile markets to avoid any losses.
  3. At the same time, In stable price times, traders refuse to pay the high fees on DEX.

So, We need to maintain the proper balancing of both the arbitrageurs and Liquidity providers to make users have enough liquidity on Dex and ensure enough users at stable prices. We can achieve this stability between both. Volatility-sensitive pricing is needed for incentivizing LPs to keep funds during volatile times and traders to continue using DEXes in stable times.

This can be achieved by Hydra Market Maker which came up with a solution.

Hydraswap Introduces a compensation parameter C for improving the efficiency of Dex usage

As discussed above CPMM price is completely depends on the pool of tokens under them. When a trader buys/sells tokens there will be an imbalance in the token pool and resulting in the price change either up/down from the CPMM price. This gives an advantage for arbitrageurs and they help to bring back the original price by rebalancing the tokens in the pools by trading at profits using arbitrage. This need not be the optimal setup for an AMM. Here are arbitrageurs are ending up with the bulk of profits. LPs could do better by observing the broader market and making a more informed pricing decision.

Hydraswap comes with an extra parameter called the “C” compensation parameter, which sets the level of compensation LPs are willing to accept vs incentivizing arbitrageurs. HMM looks at oracle prices and decides the value of C to determine how aggressively it should bid or offer when the token balance has been diverted from the original value.

C helps us determine how much they can compensate themselves versus arbitrageurs. When C=0, the scenario is the same as CPMM. Arbitrageurs have the same incentive for closing out the price discrepancy.

As C goes up, the arbitrageurs are incentivized less.

When C is between 0 to 2, arbitrageurs are getting less than in CPMM. At C=2, the arbitrageurs have no incentive.

By controlling arbitrageur compensation, the LP’s impermanent loss is lowered and the PNL profile improved over the CPMM model.

Thanks to Hydraswap which came with an intuitive approach to build an efficient AMM on Solana, Solana has been growing enormously, So a product like this, makes many Solana DeFi lovers make use of their capital more efficiently.

Things hydraswap bringing to Solana?

  1. HydraSwap is one of the first to utilize the full technical capabilities of Solana to build a powerful Dex on it, using the concentrated liquidity model (HMM — Hydra Market Maker) which helps us to enhance the usage of liquidity(LPs) efficiently.
  2. Hydraswap also gives us a smart pricing mechanism by aggregating HydraSwap’s liquidity pools with Serum’s liquidity. Hydraswap smart aggregation protocol delivers deeper liquidity and a significantly reduced risk of price slippage on big trades.
  3. HydraSwap will integrate powerful cross-chain modules. This means traders and LPs can complete transactions on any chain while leveraging the high TPS throughput, almost zero gas fees, and super-sonic processing speeds offered up by Solana.

Advantages of Hydraswap:

Liquidity adding interface

✨Hydraswap utilizes concentrated liquidity (HMM model discussed above), which allows users to designate a price range within which they are willing to make markets, reaping the same market-making rewards with only a fraction of the previously required capital.

  1. Concentrated liquidity allows liquidity providers (LPs) helps maximize capital efficiency and asset pricing.
  2. Hydraswap circumvents the problem of bootstrapping liquidity, by routing orders into Serum’s order books. This allows Hydraswap access to high volumes and thus guarantees competitive price finding and deep markets from day one.
  3. Another strength derives from building within the evolving ecosystem of the competitively scalable Solana network.
  4. Traders access deeper liquidity, LPs earn higher yields
  5. Hydraswap will be a crucial part of Solana by providing DeFi users to achieve the transaction instant finality for their swaps with 0 fees(Negligible) and also helps users to use their funds efficiently by providing smart LPs.
  6. Being built on Solana, Hydraswap provides unparalleled speed and scalability.

Finally, Hydraswap is trying to bring the capital efficiency for Lps, the liquidity and order depth of Serum, the empowering infrastructure of Solana, and the familiar user experience of an AMM.

Token $HYS:

$HYS will serve as the governance token of the AMM. Additionally, the token will be used to incentivize vital ecosystem participants like traders and LPs to use the platform.

$HYS plays a major role in the Hydraswap ecosystem, As it will be used to drive the Liquidity provider to increase the LPs to earn the $HYS which helps to maintain the constant and smooth execution of trades because of enough liquidity on the platform. Holders of $HYS are also eligible to take part in the decisions of the project. It is also used in IDO and crowdfunding on hydraswap.

Notables:

🔥On August 31st, the Solana IGNITION Hackathon kicked off with nearly 6,000 participants across 568 projects from around the world. The winners received prizes totaling $5 million. The Pyth Prize, sponsored by the Pyth Network, was awarded to HydraSwap — a decentralized exchange built on top of Solana. 87 projects had competed for this prize.

🔥 The product is in beta, But they have gained huge community support and had acquired testers for the project as well. They have around 11k followers on Twitter and 18k members in telegram chat.

🔥| Hydraswap X PythNetwork |, Hydraswap uses the Pyth Oracle to provide a more accurate data feed.

Official Links:

website: https://www.hydraswap.io/

Dex Link: https://beta.hydraswap.io/

Twitter: https://twitter.com/hydraswap_io

Telegram chat: https://t.me/hydraswap

--

--

𝓨𝓪𝓼𝓱

I’m a writer with a Full focus on upcoming blockchain projects. Interested in DeFi and blockchain technology.