We’re thrilled to announce that Hydranet has reached a groundbreaking milestone — the first successful trades on testnet! The trades took place on the 6th of October 2024 and constitute a significant step forward in the development of our Web Wallet and off-chain DEX. At the time, the trades were executed solely via the backend, but since then, we’ve successfully integrated the backend with the frontend, which is now undergoing internal testing.
Trading EVM tokens took no more than 1 second and trading BTC for an EVM token was finished in just 1.4 seconds, with the potential for even faster performance as we continue to optimize our code! In this article, we’ll not only celebrate this success but also take a closer look at how our unique trading tech works.
Hydranet is a trading platform, but not just any trading platform. Unlike traditional exchanges, Hydranet operates off-chain. But what does that mean exactly? Simply put, Hydranet executes all trades outside the blockchain using state channel protocols. For Bitcoin, we leverage the Lightning Network and for EVM and smart contract-based blockchains like Ethereum, Arbitrum, Solana, etc., we’ve developed our own proprietary solution: the Lithium Network. These protocols allows us to conduct high-speed, low-cost transactions and, when combined, facilitate seamless cross-chain trading with the same efficiency.
While Hydranet is primarily an off-chain platform, some on-chain interactions are still required, mainly to set up and establish state channels for trading. Once these channels are in place, users can trade as often as they like, without needing to record each individual transaction on the blockchain. An excellent analogy is how centralized exchanges work: you deposit funds to the centralized exchange, trade with no network fees and near-instant confirmations, and withdraw your funds to your self-custodial wallet when you’re done. All trading on centralized exchanges is done off-chain, just as on Hydranet. However, with Hydranet, you remain in complete control of your private keys throughout the entire process!
Hydranet is indeed a decentralized exchange, but it operates quite differently from most DEXs you’re familiar with. Traditional DEXs typically rely on automated market maker (AMM) protocols, which run directly on the blockchain. AMMs have their advantages, such as a continuous price movement between two price points, with low-to-no risks of liquidity gaps that could cause sudden price spikes. However, they can limit users’ ability to place limit orders at specific price points, which is a key feature of order book-based exchanges (read centralized exchanges) to allow traders to be more strategic with their positions.
To be fair, modern DEXs like Uniswap V3 have made strides to bridge this gap by introducing concentrated liquidity, allowing users to provide liquidity within a specific price range, unlike earlier Uniswap and AMM versions where liquidity was spread across an infinite price range. While this is indeed a step forward for on-chain DEXs, concentrated liquidity doesn’t fully address the challenges faced by decentralized trading today. One major hurdle is the cost for adjusting your liquidity. Every time you reposition your liquidity in an AMM like Uniswap, you incur gas fees. Now imagine trying to tweak your liquidity position 10 times a day during a bull run — it’s simply not feasible unless, of course, you’re… Elon Musk, swimming in Bitcoin, Dogecoin, and rocket fuel. But jokes aside, the gas fees would be astronomical.
Given that Hydranet is a decentralized trading platform with capabilities normally seen only on centralized exchanges — order book trading, gas-free trading, instant confirmations — you might be wondering: are we following the trend of decentralized exchange’s AMM-based solutions, or are we leaning toward the order book model used by centralized exchanges? The answer is: we’re a hybrid.
So, how does Hydranet bring together the strengths of both AMM and order book systems? Under the hood, Hydranet’s order book is built on principles similar to liquidity pools found in AMM protocols. These pools follow traditional formulas, such as the constant product formula (x*y=k), where liquidity is distributed along a resulting curve. In this formula, x and y represent the two assets being added to the liquidity pool, while k represents a constant ratio between the two assets. Buying or selling any of the assets will move the price of the assets along the curve, until the price of the assets fall outside the price range of the liquidity pool.
For Hydranet, liquidity pools constitute an efficient way of managing order book liquidity. It allow us to implement interfaces you’d find on traditional DEXs, allowing users to create liquidity pools between a minimum and maximum price, which ensures continuous liquidity between these two price points.
But what if I want to place multiple smaller orders at different price points instead of using large liquidity pools? No worries, we’re a hybrid, remember? While you can still add smaller orders at various price points using traditional DEX interfaces, more experienced users can switch to a familiar order book interface, allowing them to place limit orders at specific price points. Here’s the twist: limit orders on Hydranet employ the same liquidity pool mechanics as the traditional DEX interfaces do, but with one key difference. Instead of covering a price range, the liquidity is concentrated at a single price point. This allows traders to create precise liquidity positions and act as market makers for specific price levels.
The best part? All liquidity, whether added via the DEX interfaces or the order book, is pooled together, meaning every trader on Hydranet can tap into the same liquidity, regardless of which interface they prefer. And adjusting the liquidity is always free of network fees as it is executed off-chain.
While most exchanges tend to choose one model or the other, we’ve opted for a solution that unites the best features of both, which is possible mainly because of our unique off-chain trading approach. Users can trade and add liquidity just as they would on any traditional DEX, with familiar interfaces and one-click trades, but they also access the functionality and flexibility of traditional order book trading.
With that being said, we can’t wait to roll this out and have it tested by you! Now get out there and spread the word about us. It’s time for the crypto space to see something new!