over budget
WingRiders: Chained TurboRequests for Swaps and More
Current Project Status
Unfunded
Amount
Received
₳0
Amount
Requested
₳370,000
Percentage
Received
0.00%
Solution

We will introduce a new intermediary smart contract and modify our batching agent to bring support for seamlessly routed swaps, zap-in, and easier advanced interoperability with other dApps.

Problem

WingRiders DEX lacks support for more complex request flows such as routed swaps, zap-ins, and linked transitions. Use cases can involve advanced exchange strategies as well as multi-asset checkouts

Image file

Impact Alignment
Feasibility
Value for money

Team

1 member

WingRiders: Chained TurboRequests for Swaps and More

Please describe your proposed solution.

WingRiders will develop a new Plutarch script that will serve as an intermediary script for request outputs with datum hash forwarding capabilities. This allows extending the core protocol with functionalities such as routed swaps or zap-in.

This will enable several use cases such as routed swaps, zap-in functionality, and improved interoperability with other DApps and DEX aggregators in the Cardano ecosystem. Use cases can involve advanced exchange strategies as well as multi-asset checkouts.DeFi projects can leverage the intermediary script for advanced integrations, while the open-source datum hash forwarding script benefits developers and projects within the ecosystem. Users experience a streamlined process, and Stake Pool Operators witness improved blockchain utility, potentially attracting more users and transactions. Investors benefit from a more robust DeFi ecosystem, contributing to increased adoption and ADA value. The solution aligns with the goals of developers and researchers, fostering collaboration and contributing to the growth of the Cardano ecosystem.

Let’s demonstrate a potential usage on routed swaps.

Image file

Imagine a user who wants to swap WRTs for SHEN. The best route to do this is first to swap WRT for ADA and then wait for the first swap to process and then manually do a second swap of ADA for SHEN. This is not the best UX possible, it requires the user to submit 2 transactions and wait in between them.

Image file

With the intermediary script, it would be possible for the user to submit one swap request (WRT -> ADA), when it gets processed it creates an output on the intermediary script. This output then gets immediately spent by the batching agent, at no extra cost to the user, creating a new swap request (ADA -> SHEN). That then gets processed and the user receives the SHEN they want. In this case, the user still needs to pay the agent fee twice, but the overall experience is much more seamless, as the user only submits one request and everything else is handled by the batching agent.

Also with sufficient modifications to the WingRiders batching agent, it should be even possible to achieve routed swaps or zap-in, under ideal blockchain conditions, in the same block, making it similar in speed to a normal simple interaction with the core protocol. The agent would simply submit the first batch TX, the spending of the intermediary script, and the second batch TX at the same time, making a TX chain, that has a high probability of getting accepted into one block.

Currently, the design limitations of the WingRiders protocol only allow script outputs with a predefined datum hash. To enable datum hash forwarding, the intermediary script would be parametrized with the script address and datum hash beforehand. They would get stored in the transaction metadata.

That enables the script to retain the necessary data while conforming to the requirements of a predefined datum hash on a request output. Spending this intermediary request output would require creating an output on the script address with the datum hash defined in the parametrization process.

Why Plutarch and not Aiken?

With the advent of Aiken bringing easier and faster development cycles bundled together with smaller script sizes and undeniable performance benefits, it seems like an obvious choice compared to using PlutusTx. However, the decision isn't as clear-cut when it comes to comparing Aiken and Plutarch. Yes, the former offers significantly better tooling support and can be a great choice for developers just starting with the Cardano ecosystem, but ultimately Plutarch allows far greater control over the generated code because of how close it is to the underlying Plutus Core language. Plutarch is the most efficient way of writing smart contracts on Cardano available today if you prioritize performance and want to offer the smallest fees possible.

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

Accepting the proposal will positively impact the following groups:

  • DeFi: Projects wanting advanced integrations, such as aggregators wanting to do routed swaps across multiple DEXes can use this project to do so.
  • Projects: The datum hash forwarding script will be open source, it won’t be WingRiders specific and can be reused by other projects.
  • Users: Doing zap-in or routed swaps on WingRiders will be easier, require fewer manual interactions, and will save the user on some TX fees.
  • Community: It is a feature that has been requested countless times by the WingRiders community and this makes it possible without a V2.
  • SPOs: Enhances the utility of the Cardano blockchain, potentially attracting more users and transactions, positively impacting SPOs' stake pool performance
  • A more robust and user-friendly DeFi ecosystem increases the attractiveness of Cardano for investors, potentially leading to increased adoption and ADA value.
  • Developers: Offers developers valuable open-source material that will improve collaboration and accelerate development within the Cardano space.
  • Researchers: Contribute to the research community by introducing innovative solutions and potential advancements in decentralized finance on the Cardano blockchain.

The impact will be measured by how many requests will use the new trading capabilities, and how well we can push further advanced interoperability with other dApps - such as an aggregator creating cross-DEX routed swaps using our intermediary request output script.

The script itself will be open-sourced on GitHub and will be documented and all the progress will be shared using our community portal.

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?

As WingRiders, we have a track-proven record of developing within the Cardano ecosystem. Over the years we’ve shown to be at the forefront of technological advancements when it comes to DEXes and Cardano in general. We were the first ones to bring support for stableswaps, have a fully on-chain DAO governance, and recently launched the first trustless non-custodial launchpad. Extending the initial protocol with innovative features this proposal brings is a natural next step for WingRiders’s technical progress and innovation.

Regarding fund management, we adhere to rigorous protocols ensuring robust financial stewardship and accountability. Our practices encompass the maintenance of transparent financial records, periodic internal audits, and strict compliance with financial reporting standards. We understand the imperative nature of prudent fund management and commit to upholding the highest standards of fiscal responsibility throughout the project's lifecycle.

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

Research and Solution Architecture

  • Description: Conduct research on the datum hash forwarding script and its interoperability with the batching agent. Document the needed changes to support transaction chaining for the same block execution of complex requests with datum hash forwarding. Research possible use cases in addition to zap-in and routed swaps.
  • Expected Timeline: 3 weeks
  • Outputs: Open-source documentation regarding datum hash forwarding scripts and their possible applications. Technical documentation describing changes to batching agent.
  • Acceptance Criteria: A well-defined datum hash forwarding script is proposed.

>Smart-contract Development

  • Description: Implementation of smart contracts as defined in the documentation defined in the first milestone
  • Expected Timeline: 4 weeks
  • Outputs: Open-source repository with datum hash forwarding scripts
  • Acceptance Criteria: Test deployment and run of the datum hash forwarding script on the Preprod network.

>Batching Agent Development

  • Description: Adapting the batching agent to support execution of datum hash forwarding scripts and transaction chaining. This enables the batching agent to create a transaction chain where 1st request submitted by the user is batched, the resulting datum hash forwarding script output gets spent to create a new routed request, and this 2nd request gets batched as well.
  • Expected Timeline: 9 weeks
  • Outputs: Reworked batching agent capable of executing TurboRequests
  • Acceptance Criteria: Preprod on-chain evidence of a routed swap being executed

>Example Use-Cases Integration into the App

  • Description: Adding support to the WingRiders app for routed swaps and other most promising use cases researched in Milestone 1.
  • Expected Timeline: 6 weeks
  • Outputs: WingRiders app with support for creating various types of TurboRequests
  • Acceptance Criteria: Video demonstration of the new in-app functionality

>Testing, Fine-Tuning and Integration Documentation

  • Description: Further testing of the overall integration between smart contracts, batching agent, and the app. Also creation of public docs about the datum hash forwarding script and how other dApps can integrate with it.
  • Expected Timeline: 4 weeks
  • Outputs: Fine-tuned UX and integration between the individual components of the final solution
  • Acceptance Criteria: Open-source public documentation for integrating datum hash forwarding scripts to other dApps.

>Deployment of Final Solution

  • Description: Deploying the new functionality to Mainnet, monitoring the batching agent performance, resolving any issues that might occur and get reported in Discord ticket, marketing promotion of the new capabilities of the WingRiders protocol
  • Expected Timeline: 6 weeks
  • Outputs: Deployed TurboRequest extension to WingRiders protocol on Mainnet
  • Acceptance Criteria: It is possible to create a routed swap via the WingRiders app and get it executed without any further user input

Who is in the project team and what are their roles?

WingRiders engineering team is composed of experienced professionals in blockchain technology and software development. Our team members stand behind projects like Adalite, Yoroi wallet, firmware for hardware wallets Trezor and Ledger (bringing them to Cardano), blockchain explorer for Emurgo, and a whole plethora of FinTech products.

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

The proposal budget will be used to cover the cost of engineering and associated Project management

Milestone 1: Research and Solution Architecture

  • Milestone Budget: ₳ 68,000
  • Resource MDs:
  • Software engineer: 15
  • Project manager: 1

Milestone 2: Smart Contracts Development

  • Milestone Budget: ₳ 90,000
  • Resource MDs:
  • Software engineer: 20
  • Project manager: 2

Milestone 3: Batching Agent Development

  • Milestone Budget: ₳ 200,000
  • Resource MDs:
  • Software engineer: 45
  • Project manager: 4

Milestone 4: Example Use-Cases Integration into the App

  • Milestone Budget: ₳ 100,000
  • Resource MDs:
  • Software engineer: 30
  • Project manager: 3

Milestone 5: Testing, Fine-Tuning and Integration Documentation

  • Milestone Budget: ₳ 67,000
  • Resource MDs:
  • Software engineer: 20
  • Project manager: 2

Milestone 6: Deploying the Solution

  • Milestone Budget: ₳ 100,000
  • Resource MDs:
  • Software engineer: 30
  • Project manager: 3

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

The proposed solution not only enhances the user experience but also extends its positive impact across diverse Cardano community segments. DeFi projects, including aggregators seeking advanced integrations, can leverage the intermediary script for routed swaps across multiple DEXes. The open-source nature of the datum hash forwarding script offers a valuable resource for developers and projects within the Cardano ecosystem, promoting collaboration and innovation. Users benefit from a more streamlined process, requiring fewer manual interactions and resulting in reduced transaction fees. Additionally, Stake Pool Operators (SPOs) witness an improvement in the utility of the Cardano blockchain, potentially attracting more users and transactions, thereby positively impacting stake pool performance. Investors find value in a more robust and user-friendly DeFi ecosystem, contributing to increased adoption and potential appreciation of ADA value. The solution, by fostering collaboration and accelerating development, further aligns with the goals of developers and researchers, ultimately contributing to the growth and dynamism of the Cardano ecosystem.

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