Hydra DEX Preview & Progress Update

LockTrip.com (LOC Token) Official Blog
LockTrip
Published in
7 min readJun 7, 2021

Today we want to share an update with our community on the progress of the Hydra DEX and what has been achieved so far, including real “Footage” from the Hydra explorer. Let’s dive into it!

🔎 What is a DEX and why do we build it?

DEX is an abbreviation for “Decentralized Exchange”. As the name suggests, it offers functionality for exchanging tokens or HYDRA with each other, at a certain market price — directly on the blockchain — and without intermediaries inbetween.

As such, it offers a powerful tool not only for traders and arbitrage professionals, but it also allows new projects to kickstart their own liquidity strategy and set up a strong trading environment for their tokens.

Critical Element for new Projects

When a new project launches its ICO, it is not always be possible to immediately list on a popular exchange. Listing processes can take a long time and the Hydra DEX will provide an alternative, which is always available and fully permissionless.

Projects could allocate a liquidity budget from their fundraising to setup a liquidity pool on the Hydra DEX. Once they do this, the trading pair is ready for trading immediately and market participants can buy and sell the token as they please.

Liquidity Providers

Even though project managers have a strong incentive to setup a pool and supply it with sufficient capital for liquidity, they are not the only ones with an interest. Community members can also contribute additional liquidity to the pool, in order to generate income from trading fees.

Each trade will generate a small percentage of the traded amount as a fee, which is equally distributed among all liquidity providers, in proportion to their pool share. This allows for alternative income streams and gives the community the opportunity to actively contribute to the project of their preference.

🧩 The Hydra DEX — a Key Pillar to the Ecosystem

The DEX not only offers critical functionality for projects that build on Hydra, but it also boosts the transactional economy. Each trade executes a number of smart contracts, depending on the complexity of the ecosystem and swapping path with highest yield.

This means that a single swap can result in multiple transactions being executed, each burning a small amount of HYDRA. In addition to the organic swaps, there will also be arbitrage trades — which take advantage of price differences between the current price on the DEX and prices on centralized exchanges. In case of a significant deviation, the arbitrage trade becomes profitable and incentivizes someone to take advantage of the opportunity.

The larger the liquidity pool is, the greater the opportunities will be, and the more trades can be expected. This is also why DEX applications are among the most successful transaction generators, which can be verified from existing examples such as Ethereum.

🔨 Building a Native DEX for Hydra

Over the past months, we have worked on developing a native DEX for the Hydra chain (for which the name and branding is yet to be revealed). The process has been very exciting from the start and today we want to share a quick update on what we have achieved so far.

  • Settle on a strategy for the DEX architecture — complete
  • Define the building blocks needed — complete
  • Start working on the smart contracts — complete
  • Deploy the first smart contracts for basic testing & iterate on the individual functions — complete
  • Finalize the smart contracts — complete
  • Deploy the smart contracts on mainnet — complete

Most of the work on the blockchain is now complete and we are happy to share that the first version of the DEX is LIVE on mainnet. Please note that we are still continuing our testing process and small adjustments may follow in the near future.

⚙️Seeing the DEX in Action

We will now look into a DEX smart contract and how certain interactions with it look like on the chain. All of these are public. The screenshots were taken from the Hydra Explorer, so you can easily verify and observe them for yourself.

The Liquidity Pool

The smart contract that you see below represents the liquidity pool. As you can see — it has 18 TB tokens and 83 TA tokens in it (rounded numbers). The pool consists of these two tokens and the ratio between them determines the relative price. In simple terms, 18 TB tokens = 83 TA tokens.

Or in other words: 1 TB token = 4.6 TA tokens. Anyone who wants to swap between TA and TB tokens will be able to do it at this rate (excluding slippage and spread for simplicity).

💎Adding Liquidity to the Pool

In the screenshot below you can see an example for adding liquidity to the pool. Specifically, you can see that the wallet HBK…G9k added 40 TA and 8.3TB tokens to the pool. As a result of this, the wallet became a liquidity provider — which means that it now owns part of the pool. As a representation of the share it owns, 18.16 HYD tokens were minted by the pool contract and sent back to the wallet.

Later, the liquidity provider can exchange the HYD tokens back for TA & TB tokens (including accrued trading fees). Below you can see the summary for the “liquidity adding” transaction:

40 TA & 8.3 TB tokens sent to the contract → 18.16 HYD tokens received back

⚖️ Swapping Tokens

The added liquidity is now available for the public. Traders on the chain can use it to exchange tokens at the rates predefined by the token ratio in the pool (as explained above).

In the screenshot below you can see how such a trade looks like. The wallet adds 1 TA token to the smart contract and the smart contract sends back 0.2 TB tokens.

The swap summary looks like this:

Swapped 0.2 TB tokens in exchange for 1 TA token.

Removing Liquidity from the Pool

At some point a liquidity provider may want to redeem the liquidity he put into the pool. For this purpose, the previously received HYD tokens (which represent ownership of a share of the pool) are exchanged back with the pool. The pool returns TA & TB tokens as per the current ratio and including accrued swapping fees. You can see in the screenshot below that the HYD tokens are burnt in the process.

Looking at the summary, 18.16 HYD are leaving the wallet in exchange for the TA & TB tokens.

📝 Conclusion

Now you have seen the whole process in action and know how operations such as swapping, adding liquidity and removing liquidity work. Please note that all the tokens used above are for demonstration/testing purposes and are not publicly available.

We are very excited about the progress so far and are looking forward to sharing more about it soon. In terms of development the team is now focusing on building the web application and proper interfaces, so that users can easily interact with the smart contracts in a simple UI.

If you have any questions or simply want to connect with us, feel free to join the official Hydra community:

Join the Hydra Community 👈

HYDRA is a proof-of-stake, inflationary blockchain that tackles some of the most profound and challenging economic issues with existing blockchain economies. Some of the more notable features:

🔥 100% Burn of all Transaction Fees

💎 50% Royalty on Gas for Smart Contract Creators → More Info

📌 Fixed Coin Transaction Fees of $0.20 → More Info

📌 Fixed Token Transaction Fees of $0.50 → More Info

💰 20% Minimum APR Staking Income → Staking Calculator

📈 Up to 540 TPS Elastic Capacity

🔏 EVM Compatible Smart Contract Platform

⚙️ Wallet-Level Scalability → More Info

🗳 Unique Decentralized Governance Protocol

--

--

LockTrip.com (LOC Token) Official Blog
LockTrip

Blockchain & fiat powered marketplace.Hoteliers & landlords list/rent property & manage bookings,& pay no commission. Retweets R not endorsements.