[SOLUTION] Please describe your proposed solution.
We assert that, given the existing off-chain execution systems, Cardano currently lacks the readiness to bring a substantial number of users into its DeFi ecosystem (aka readiness for the next bull run). This limitation arises due to potential challenges for end users in the face of high traffic influx.
In response to this, we present a framework, to be developed in Rust and offered as a fully open-source solution. This framework is designed to be adopted and integrated by other dApp teams, providing widespread utility throughout the entire Cardano DeFi ecosystem. Its primary goal is to markedly reduce costs per order for end users and, concurrently, elevate the throughput to a level that ensures a seamless experience.
At Spectrum Labs, we are dedicated to decentralization, and consequently, the framework itself will embody principles of openness, transparency, and decentralization—aligning with the historical approach we have maintained with all our open-source products.
Green Orders
In the current dApps one order is usually represented as 2 on-chain transactions. We can call the first transaction an “order placement” and the second one a “verification + execution”. Thus the end user a) pays for order execution (so-called “batcher” fees) and b) twice pays network fees. This is not ideal.
To enhance the efficiency and cost-effectiveness of the off-chain execution system, as well as to significantly diminish the cost per order, we are streamlining the process by eliminating the necessity for on-chain order placement. Instead, we encode these orders into a message, which is then relayed off-chain to the designated executors. These off-chain orders, referred to as "green," incur zero on-chain overhead. The message's structure is depicted below:
To execute off-chain orders effectively, an on-chain entity is essential for validating execution and facilitating the release of user funds without direct user interaction. Hence, we introduce an Autonomous Account (AA) utilizing eUTxO — an on-chain entity capable of reading order messages, validating execution, and releasing the necessary user funds for deal execution. Users engaging with AA are required to deposit funds earmarked for trading, akin to a deposit made to a centralized exchange (CEX) but without relinquishing custody of their funds.
Since now only 1 on-chain transaction is required per order (in the current systems there are 2 on-chain transactions) the ensuing benefits of this modification include:
- Reduction in on-chain data storage
- Elimination of previously required fees for placing on-chain orders
- Significant increase in throughput
- Reduction in Cardano P2P layer utilization
Autonomous Account
An interoperable Autonoumus Account with an arbitrary number of applications is shown in the figure below. The burden of order validation is now delegated to an external script.
The API of AA is described in the figure below:
Explore more about Autonomous Account and Green Orders in the Spectrum Bloom: A self-developing, sustainable, eUTxO-native framework for decentralized finance white paper.
The solution can prove advantageous for various user categories, and our focus will center on three key groups:
-
End users (both longstanding and new members of the Cardano ecosystem engaged in DeFi) stand to gain by seamlessly utilizing Cardano dApps even during periods of high traffic. Additionally, they can enjoy minimal fees for their transactions.
-
Established dApp teams have the opportunity to embrace and integrate this solution with their smart contracts. This integration promises heightened throughput and reduced fees, serving as additional selling points for their products.
-
Developers can benefit by studying the open-sourced code base of a production-ready solution, contributing to increased enthusiasm within the ecosystem as a whole.
[IMPACT] Please define the positive impact your project will have on the wider Cardano community.
To measure the impact we will use the following metrics:
- Measuring the utility within the ecosystem: Number of projects that decided to onboard the solution
- Measuring the trust of the ecosystem: Total Value Locked in those protocols that decided to onboard the solution
The outputs will be released on GitHub and will be open to anyone — the broad documentation of how to use and integrate the solution. Everything will be broadcast through Spectrum Labs Community Channels (such as Twitter, Discord, and Telegram).
We will share those outputs via Spectrum Labs community channels (such as Twitter, Telegram and Discord).
[CAPABILITY & FEASIBILITY] 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?
-
Spectrum Labs pioneered the decentralization in off-chain execution systems in Cardano. Currently, the Spectrum DEX operates on Cardano using a fully trustless but not that efficient and transparent system. This proposal partly improves Spectrum DEX’s current decentralized off-chain system that can be expanded to various other dApps. Spectrum Labs consists of several research and development teams that are working on different products and solutions.
-
Our development team possesses extensive experience of over 5 years in the DeFi and blockchain industry, including >2 years specifically dedicated to the Cardano space.
-
Spectrum Labs boasts a reputable standing within both the Cardano and Ergo communities.
-
Our development team has received successful funding several times through the Catalyst program, consistently delivering timely progress updates.
[Project Milestones] What are the key milestones you need to achieve in order to complete your project successfully?
Title: Off-chain Relay Implementation
Description: Off-chain orders must be able to reach executors, thus a configurable relay node that anyone could set up is required. Such a node will be implemented in Rust and supplied as a part of the framework.
Outputs:
- The implementation of the Off-chain Relay in Rust covered with tests
Acceptance Criteria:
- Code is written and a pull request is submitted to an open GitHub repository
- Code is covered with unit tests
- The code base is documented
>Title: Autonomous Account Smart Contract Implementation
Description: According to the specifications described in the white paper, implement the AA smart contract
Outputs:
- An implementation of the Autonomous Account Smart Contract in Aiken covered with tests
Acceptance Criteria:
- Code is written and a pull request is submitted to an open GitHub repository
- Code is covered with unit tests
- The code base is documented
>Title: Green Orders Implementation
Description: According to the specifications described in the white paper, implement the code base for Green Orders
Outputs:
- The implementation of Green Orders in Rust covered with tests
Acceptance Criteria:
- Code is written and a pull request is submitted to an open GitHub repository
- Code is covered with unit tests
- The code base is documented
>Title: SDK development
Description: The SDK is the interface for developers to make such operations as sign, submit, and monitor. It is needed for easier integration with the system.
Outputs:
- SDK code base covered with tests
- Documentation for the SDK is placed on GitHub and GitBook and accessible to anyone
Acceptance Criteria:
- Code is written and a pull request is submitted to an open GitHub repository
- Code is covered with unit tests
- The code base is documented
>Outputs:
- All listed above components of the protocol are developed (code is written) and covered with tests
- All outputs are well documented and the documents are published on GitHub and GitBook
Acceptance Criteria:
-
Project Completion Report is written and submitted
-
A video demonstrating how all the components work together is recorded as evidence of the project's completion
-
Comprehensive documentation on how to use the tool is provided in GitHub readme.md file in an open repository
[RESOURCES] Who is in the project team and what are their roles?
Leaders
Ilya Oskin
Tech Lead
Engineering Leader with 6 years of experience in the blockchain industry. Keen on functional programming. Took part in the development of the reference node of the eUTxO-based blockchain Ergo and its explorer. Designed and developed the first version of the ErgoDEX protocol from scratch. The main architect of the Spectrum Finance Cardano AMM. Lead researcher and developer of the Spectrum Network
In the scope of the proposal, Ilya is responsible for leading the development of the whole project's outputs
Yasha Black
Product Lead
Product manager, product analyst, UX/UI, and JavaScript developer with 7 years of experience in the IT industry. Built a strong product team, and designed the first version of the Spectrum Finance user interface.
In the scope of the proposal, Yasha is responsible for funds management, as well as for the control and acceptance of final works
Core team
Timofey Gusev
Lead Software Developer
Developed smart contracts and execution bots for Ergo and Cardano sides of Spectrum Finance protocol (Scala, Haskell, Plutus). Designed and developed an internal Cardano explorer.
Timofey is responsible for implementing the proposed solution in the proposal's scope.
Alexander Romanovsky
Lead Core/SC Developer
Developed smart contracts and off-chain services for Ergo and Cardano sides of the Spectrum Finance AMM protocols (Scala, Haskell, Plutus, Plutarch).
Alexander is responsible for implementing the proposed solution in the proposal's scope.
Ruslan Salakhov
Lead TypeScript Developer
Build the architect of the current Spectrum Finance interface. Has 7+ years of experience as a JavaScript developer and 5 years in building interfaces and tools in fintech.
Ruslan is responsible for implementing the proposed solution in the proposal's scope.
Alex Oranov
Senior Blockchain Researcher
Has 5 years of experience in research and development, including scientific work, industrial solutions related to artificial intelligence, and data analysis. Participated in the smart contracts design and development of the Yield Farming protocol (Ergo side). Researcher and one of the Whitepaper authors of the Spectrum Network protocol.
Alex is responsible for implementing the proposed solution in the proposal's scope.
[BUDGET & COSTS] Please provide a cost breakdown of the proposed work and resources.
Milestone 1. Off-chain Relay Implementation
Duration: 1 month.
Monthly costs:
- Development and documenting: $21,000
- 3 Senior Developers
- Management: $8000
- 1 Tech Leader
Total milestone costs: $29,000
Milestone 2. Autonomous Account Smart Contract Implementation
Duration: 1 month.
Monthly costs:
- Development and documenting: $21,000
- 3 Senior Developers
- Management: $8000
- 1 Tech Leader
Total milestone costs: $29,000
Milestone 3. Green Orders Implementation
Duration: 1 month
Monthly costs:
- Development and documenting: $21,000
- 3 Senior Developers
- Management: $8000
- 1 Tech Leader
Total milestone costs: $29,000
Milestone 4. SDK development
Duration: 1 month
Monthly costs:
- Development and documenting: $21,000
- 3 Senior Developers
- Management: $8000
- 1 Tech Leader
Total milestone costs: $29,000
Final Milestone
Duration: 1 week
Monthly costs: $0
Total milestone costs: $0
All the works for the final milestone will be volunteered by Spectrum Labs founders.
Total Budget: $116,000
For now, the ADA price is close to $0.4 per ADA. We set the budget of this proposal to 300,000 ADA to mitigate price fluctuation risks.
[VALUE FOR MONEY] How does the cost of the project represent value for money for the Cardano ecosystem?
We estimated the cost of the project based on average dev salaries which is $7,000-10,000k for 5+ years of experience (senior software developer grade). Our team is blockchain and Cardano-focused and obtained most of the experience in the crypto industry so the domain-specific knowledge is sufficient to tackle the most challenging industry problems.
Since the core idea of the solution is to shift order execution off-chain it as a result it will significantly reduce the utilization of Cardano network resources.
In the long run, the project has the potential to preserve millions in end-users' funds, drawing in fresh users and developers. Furthermore, it can play a pivotal role in rapidly enhancing existing dApps, facilitating the swift delivery of value. Finally, through the implementation of this solution, we are at the forefront of pioneering Cardano DeFi composability. This not only enables the execution of automatic non-custodial financial operations but also positions us as a leading solution in terms of capital efficiency.