# 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.
What?
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
- polkadot-js
- rust
- substrate
- typescript
- vue





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