not approved
Yadex: an open, eutxo-fit, efficient, versatile and novel DEX
Current Project Status
Unfunded
Amount
Received
₳0
Amount
Requested
₳46,250
Percentage
Received
0.00%
Solution

Efficient aiken on-chain contracts (PoC already done) and offchain rust code (todo) that are easily readable, reusable and elegantly solve the stated goals.

Problem

Building an open source DEX tailor-made for eUTxO, composable, fully decentralized, economically viable and with advanced order types and strategies.

Team

1 member

Yadex: an open, eutxo-fit, efficient, versatile and novel DEX

Please describe your proposed solution.

Current DEXs on cardano are of three kinds:

  1. constant product liquidity pool (minswap, sundae, spectrum, …)
  2. simple order book (muesli, genius)
  3. complete but complex and expensive (axo)

I believe there is space for a new DEX that has the following characteristics:

  • Open source: on-chain and off-chain code will be open sourced.
  • Fast transactions: An order should happen in the next block, within 20s, as long as there is space and your wallet submit it in time.
  • Direct market orders: No need for a 2-step process where you first send tokens then get back the swapped ones if a batcher processed your transaction. What you sign is what you get (wysiwyg)!
  • Partial limit orders: Limit orders are possible and can be partially filled.
  • Sliding orders: trade price evolves with time, such as Dutch auctions
  • Atomic composable transactions: Routing between multiple actions, such as swap iBTC/Ada then Ada/iEth happen in a single transaction. This increases the DEX efficiency.
  • Scaling: The DEX parallel throughput scales as more participants provide liquidity.
  • No sandwich attack: There is no slippage. And nobody can profit from a transaction you are involved in since exact swap prices are fixed when you sign a transaction.
  • Fully decentralized: You could submit the transactions yourself.
  • Simple low fees
  • Automated trading: Grid trading natively supported.
  • Fine-grained liquidity providing: You have flexible liquidity provision, more or less concentrated, for advanced strategies
  • You keep your staking power
  • Futures and options

These are all features that fit perfectly with Cardano's eUTxO model. I already have proofs of concept contracts for most of these. Any of the existing DEXes on Cardano have tradeoffs that make some of these properties impossible. For example batching prevents atomic composability. Axo's dedicated processing network makes it expensive and not as easily composable with other markets, etc.

This will benefit all Cardano users as it will make trades more capital-efficient and have a lower impact on the overall network block space.

Remark: This project has many similarities with the very recent beta-release of cardano-swaps, so I see potential collaborations.

Please define the positive impact your project will have on the wider Cardano community.

This project will have a positive impact for all DeFi users as well as the general Cardano community.

The impact on DeFi users may be measured in multiple ways.

  • measure the reduced fees for all activity using the DEX compared to other DEXes
  • measure the amount of activity taking advantage of atomic composability for cross-protocols transactions

The impact on the general Cardano community can be measure by the saved network throughput when using this protocol compare to other alternatives.

Since all contracts will be public, these measures will also be easily reproducible by any independent third party.

What is your capability to deliver your project with high levels of trust and accountability? How do you intend to validate if your approach is feasible?

This DEX project is doable with Cardano as it is today. In fact I already have PoC aiken contracts for some of the expected features.

In parallel, I'm building elm-cardano, a new Cardano frontend framework in Elm, a functional language for the web (see my other Fund 11 proposal). This endeavor deepens my understanding of all the low-level Cardano features by dealing with transaction building and community tools like indexers.

Finally, I intend to build the offchain market making provider in Rust. This is a language I've been using for many years. It is well fitted for the task as it can provide fast and reliable code for both Cardano-infra-related needs, and the mathematical optimizations for the market making needs. This part still needs to be done, but I'm confident in my abilities to figure it out.

In general, I've also chosen aiken, rust, and elm because these are languages with welcoming and friendly communities. I'm confident in finding insight in these communities for potential hurdles along the way. I'm also confident using these languages will result in an open source code with many more external contributions than if choosing Haskell.

What are the key milestones you need to achieve in order to complete your project successfully?

  • Completing the PoC on-chain aiken contracts
  • Providing a simple frontend interacting with these contracts in a limited manner
  • For each contract feature, demoing a predetermined (but live) usage of these contracts on testnet

>Build a simple offchain market maker capable of the following:

  • listing available orders for a given pair
  • suggest a profitable transaction for that given pair
  • submit such a transaction

>Build a simple frontend capable of communicating with an offchain market maker (milestone 2) to suggest trades to an end user and submit transactions using these aiken contracts (milestone 1)

This frontend should work on testnet.

>- Refine all 3 tools (contracts, market maker, frontend) for an enjoyable user experience on testnet.

  • Build analytics to compare the performance of these compared to alternative DEXes.
  • Finalize the accompanying white paper.

Please provide a cost breakdown of the proposed work and resources.

All three technical aspects of the project (contracts, offchain backend, offchain frontend) will take roughly the same amount of time. I estimate approximately 2 months of work for each, considering 20h of work per week. With an estimate of 3K€ per month, this amounts to 18K€ for the 6 months period.

I estimate an additional 500€ for different cardano-related services for integration tests, like Demeter and other similar infrastructure services.

At an estimated price of 0.40€ per Ada, this amounts to 46250 Ada.

Considering this is a technical proposal leading to a testnet product, I do not intend to spend additional amounts for legal or marketing. These will come in a followup step. Though I expect the open source nature of the project to actively attract interest of the Cardano Dev community, leading to more awareness from the Cardano builders.

How does the cost of the project represent value for money for the Cardano ecosystem?

My estimate of 3K€/month for a half-time job correlates to experienced developer wages in my country (France). Blockchain positions would typically be much more expensive, so I consider this budget to be very competitive and excellent value for money.

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3m 24s
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4m 3s
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3m 48s
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2m 16s
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3m 14s
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3m 19s
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4m 59s
    Darlington Kofa
0:00
/
~0:00