# Hydra liquidity protocol

For the past year, we were envisioning the perfect (not just) AMM chain. We thought about it's design and were searching for the best platform to build on. We knew that we found it once we tested the waters in the polkadot community last year. We were immediately sold by the community. We built some tools, contributed to the code a little and tried to learn Substrate as it developed. At first, it was really hard to keep up, but as it matured, we were bold enough to start building our dream. This is just a small #hacky glimpse into what we are building.

XYK AMM + Exchange

We decided to take one unique feature we were building for the past few weeks and combine it with an Uniswap style AMM module. We call it in-block order matching. The application looks like classical AMM to the user, but it has its own little order book that takes exchange intentions that come in every block, clears them out with zero slippage, and uses AMM to trade the remaining amount before the block is included into the chain.


Yes. Order book and AMM combined. And that's just a teaser of what is coming. We didn't consider joining Hackusama because we didn't think that we could finish something that is interesting. We envisioned this feature about a month ago and immediately started building proof of concept. We learned a lot about transaction lifecycle and block validation in the process. It still needs polishing and a better matching algorithm but we thought it was something we could show off. About five days ago.

The journey

Five days ago, we were wondering… Is this enough to join Hackusama? Well... Let’s try. We didn’t have any user interface. We didn’t have share-able code, because our custom pool design or any of the other features were not ready for prime-time. We needed to start everything from scratch. New substrate-node-template. Completely new UI project. Exactly five days later. Here we are. We didn’t do everything we wanted or as we wanted. But we did a LOT of work and it was hell of a ride. We certainly can be proud of ourselves. To name just one of many things we can be proud of. We learned how to build custom RPCs, implement them and integrate into the UI in a day.

What's next for hack.HYDRA-DX?

We will continue building our dream chain. We hope that we will be ready to launch our incentivized, bleeding edge version soon on Kusama. We will be testing new features and issue bounties. We hope we’ll launch our mainnet early next year. With our custom single pool design, where any asset is tradable for any asset, with higher capital efficiency, with better order matching algorithm. With more features on top of the liquidity. Summoning the multi headed HYDRA-DX.

Show me

The UI is running at https://hack.hydradx.io

The node is running at wss://hack.hydradx.io:9944 you can connect to it with polkadot-js apps by providing these types

  "Amount": "i128",
  "AmountOf": "Amount",
  "Address": "AccountId",
  "BalanceInfo": {
    "amount": "Balance",
    "assetId": "AssetId"
  "LookupSource": "AccountId",
  "CurrencyId": "AssetId",
  "CurrencyIdOf": "AssetId",
  "IntentionId": "u128",
  "IntentionType": {
    "_enum": ["SELL", "BUY"]
  "Intention": {
    "who": "AccountId",
    "asset_sell": "AssetId",
    "asset_buy": "AssetId",
    "amount": "Balance",
    "discount": "bool",
    "sell_or_buy": "IntentionType"


Built With

+ 31 more
Share this project:


posted an update

To clarify. We are developing our protocol for half a year now, with research starting more than a year ago. The order matching was envisioned around five weeks ago as a measure to lower slippage between the trades, and provide some advanced functionality to the chain we will disclose in the future.

When we had first working proof of concept, we decided to join Hackusama. That was on Monday 10th of August 2020.

We built the Uniswap like AMM module for testing comparisons to our own model quite some time ago, but we needed to modify it and to create RPC calls, which we didn't do before for this to work out.

As some parts of our protocol are not ready to be released yet, we decided to spin up a new repo for the node. The UI was created completely from scratch in five days. We're happy how it came out, but it's not perfect by any means and we will be working on that in the near future.

Thanks again for the great feedback! We are looking forward to disclosing more with such a great community.

Log in or sign up for Devpost to join the conversation.

posted an update

Thank you everybody for the feedback!

We are currently validating our token and pool model. More info coming very soon on (twitter)[https://twitter.com/hydra_dx] or (here)[https://discord.gg/kSMpDE]

As the title video doesn't always show the next one, here is a (link to youtube playlist)[https://www.youtube.com/playlist?list=PLRfLTjWZLGYxHf-4myGyXFgU6rzcxP8nr].

I've also added another one on how to add an account to the extension since it was a popular request.

As for technical assistance and direct contact, we've created a public discord channel you can join (here)[https://discord.gg/kSMpDE]

Log in or sign up for Devpost to join the conversation.