Astarter Technical Advancements: Enhancing Concurrency in ADEX

Astarter
Astarter
Published in
3 min readNov 13, 2023

Introduction

At Astarter, we’re continuously innovating to make ADEX, our decentralized exchange on Cardano, more efficient and user-friendly.

Our primary goal was to boost the concurrency of ADEX, ensuring it could handle a higher volume of transactions per block.

In this article, we’ll delve into the recent technical enhancements we’ve made to improve concurrency in ADEX.

Our Solutions

Two-Step Transaction Flow

We implemented a two-step transaction process where users submit transaction requests to a request pool, which is then packed and managed by the Matchmaker. This process increases concurrency, allowing ADEX to handle 3–5 requests per block.

Transaction Chaining for Higher Concurrency

Our analysis found that Transaction Chaining offers a unique approach to concurrency. Instead of batching and ordering UTXOs off-chain, it orders them virtually in a “first-come-first-served” manner. It enables lower latency and substantially higher throughput.

Small Tests

We conducted small tests on the Cardano chain (Preprod testnet) and successfully sent two transactions in one block. This demonstrates that one block can process multiple packages, improving concurrency.
Tx1: https://preprod.cardanoscan.io/transaction/876d42e0944da52394bb9f4c57d4f6b592ccb9c0c9b8a25bdac6112b60ec9c50
Tx2: https://preprod.cardanoscan.io/transaction/de0d01fa7fa614ea20af66ae1fac43bc7a6a90143e4f77b48a954c9929ac44e6?tab=utxo

Follow-up tests

Additionally, a follow-up test involved submitting 100 transactions consecutively, and they were packed into blocks in sequence. This means there’s no limit to transactions within 100 in the Cardano chain mempool.
https://preprod.cardanoscan.io/transactions?blockHeight=1255375
https://preprod.cardanoscan.io/transactions?blockHeight=1255376
https://preprod.cardanoscan.io/transactions?blockHeight=1255377
https://preprod.cardanoscan.io/transactions?blockHeight=1255378
https://preprod.cardanoscan.io/transactions?blockHeight=1255379

Implementing transaction chaining alone in ADEX would considerably increase concurrency, potentially reaching 25 transactions per block, similar to the BTC chain. Combining this with the two-step transaction process could take ADEX’s concurrency to even greater heights.

It’s important to note that this solution is currently in testing, and the specifics will be unveiled in future updates. The expected deployment of the upgraded DEX, using transaction chaining, is set for early September. However, it’s important to be aware of potential delay risk factors.

The transaction chaining approach brings both risks and rewards. While challenges such as implementation complexity, smart contract vulnerabilities, and scalability must be addressed, the potential benefits, including increased efficiency, improved user experience, and enhanced DeFi capabilities, make this an exciting development for ADEX and the Cardano ecosystem.

Split popular trading pairs into multiple UTXO

This solution will be used in our ADEX Version 3 to improve the concurrency while it’s currently confidential, the details will be published at the appropriate time.

Conclusion

Astarter is at the forefront of innovation in DeFi on Cardano. Our dedication to improving concurrency in ADEX reflects our commitment to creating a seamless and efficient user experience. While the road ahead may present challenges, the rewards are promising.

As we continue to refine and implement these solutions, we remain committed to pushing the boundaries of DeFi on Cardano. Stay tuned for more updates as we work towards a brighter, more efficient future for DeFi.

Social Links

Website | Twitter | Telegram | Discord | Medium | YouTube

--

--

Astarter
Astarter

The DeFi infrastructure hub on Cardano, powering decentralized finance applications and the Cardano ecosystem.