Please describe your proposed solution.
Rats DAO staking portal is currently being used by Rats DAO, Onesies NFT project and ALDEA DAO and potentially for many other projects. The platform has some limitations that we want to improve by:
- Creating a Staking Protocol that establishes general parameters for pool contracts.
- There is no a simple way for DAOs or users to create their own staking pools smart contracts
- Interacting with the Staking smart contracts from outside our platform is not easy.
- Implementing a commission system.
- Allowing pools to be configured to deliver more than one token in exchange for deposits.
- Improving the reinvestment of rewards to avoid the loss of seniority and perform the process in a single transaction.
- Improving the reinvestment of rewards to avoid the loss of seniority and perform the process in a single transaction.
- Incorporating an on-chain metadata system.
- Enabling metadata interest calculation in NFTs to enrich pools and gamification.
- Customizing the name of the deposit token (UD Token) in each pool for a more unique experience.
- Implementing a token blocking and minting contract to overcome token limits on each deposit.
- Improving the management of the site admins wallets through a database to visualize and modify configurations and restrictions.
This will be open sourced and will be a public good for Cardano Blockchain, other projects will be able to use our front end and our staking platform.
Upgrades for V 2.0
Creation of the RATS Staking Protocol
In the current version, the pool contracts are independent and there is no way to set parameters that govern them all. However, when creating a protocol, it is possible to establish an administration context where all pools are included.
Within this context, it is possible to set general recommended parameters and limits for some of the fields required to create a pool. These parameters can serve as guidelines and recommendations for users when creating new pools, helping to maintain a certain coherence and cohesion in the protocol.
Creating Staking Pools
In the current system, there is a significant barrier to entry for users or DAOs who want to create their own staking pools. This complexity discourages many potential pool creators and limits the growth and diversity of the ecosystem.
Our project aims to simplify this process by creating a user-friendly interface for staking pool creation through a REST API. This API will abstract away the complexities of smart contract programming and protocol interaction, providing users and DAOs with a simple, straightforward method for creating their own staking pools.
The API will provide endpoints that allow the client to define parameters for a new staking pool, such as the staking token, reward token, and pool parameters. The user or DAO would make an HTTP request to these endpoints, providing the necessary parameters. The API would then handle the rest, generating the required smart contracts and deploying them to the Cardano blockchain.
This process significantly lowers the barrier to entry, allowing more users and DAOs to participate in the staking ecosystem, and fosters greater diversity in the types of staking pools available. Moreover, it democratizes access to blockchain technologies, enabling a broader user base to leverage the advantages of decentralized finance
Interacting with the Staking smart contracts
Currently, the interaction with the staking smart contracts is largely limited to our platform. This is due to the technical complexity and specialized knowledge required to manually interact with these contracts, including understanding the contract's functions, handling transaction signatures, and dealing with blockchain confirmations. This not only limits the accessibility of our platform but also prevents integration with other services or applications that may want to leverage our staking infrastructure.
With the introduction of the REST API, we aim to simplify and standardize interactions with our staking smart contracts. The API provides a clear and structured way to interact with the contracts, regardless of the client platform or programming language.
By providing clearly defined API endpoints, users can easily interact with the staking pools. For example, endpoints can be used to query pool data, make deposits, withdraw funds, reinvest earnings, and more. These requests are made using standard HTTP protocols, making them accessible from any application capable of making HTTP requests.
Through this enhancement, we aim to ensure that our staking platform is not only more accessible and user-friendly but also primed for integration with the broader blockchain and DeFi ecosystem.
Commission system for the Protocol
In the existing version of the protocol, the financial responsibility lies with Protocols and DAOs that aim to implement a new pool. They are the ones who contribute payment to the Protocol. However, in the upcoming version, we are shifting this payment obligation from the pool creators to the end-users who utilize these pools.
This change opens up new opportunities for staking pool creators. In the new system, not only will they be able to create and maintain their pools but they'll also have the chance to earn commissions from the usage of their pools.
In this updated system, fees will be levied on users' transactions such as deposits, harvests, and withdrawals. The management of these commissions will be delegated to a commission contract. The revenue generated from these commissions will then be distributed amongst the protocol's core team as well as the creators of the staking pools.
The protocol's commission serves multiple purposes. Primarily, it provides the necessary funds to maintain the protocol service and cover fixed expenses. Additionally, it provides the resources to staff a team dedicated to handling user queries. It also paves the way for the development and implementation of both protocol improvements and website upgrades, as well as other activities related to enhancing the user experience and functionality.
To ensure full transparency in the collection and distribution of these fees, all transactions will be recorded through a smart contract. This will give clear visibility of the commission process, reinforcing trust and reliability in the protocol.
Receiving rewards in more than one token
Pools will be able to be configured to deliver more than one token in the form of rewards. In the current version each pool has one investment unit and one reward unit. We want to enrich their functionality by allowing pools to deliver more than one token per deposit, i.e. to have several harvest units, each with its payout coefficient depending on the deposit.
Example: deposit rats and receive Min, Rat and NMKR.
Re-investing rewards
In the current version, when a user wishes to re-invest his rewards in funds he must cash his rewards and create a new deposit with those tokens. However, by doing so, he loses the benefit of the seniority accumulated in his first deposit, since they are considered as new deposits.
The proposed solution consists of modifying the amount of the first investment by adding the tokens without modifying the harvest date, taking full advantage of the seniority of the existing deposits. In this way, the loss of the accumulated seniority is avoided and its effect on the deposits is maximized.
In addition, this solution allows the entire reinvestment process to be performed in a single transaction instead of requiring two separate transactions.
On-chain metadata
We can achieve this by:
1- Backend signing with a special wallet the metadata in question. This signature is sent together with all these fields in the redeemer and the public key of the wallet used to sign. The contract performs a verification of this signature. If they match you can be sure that the metadata sent in the redeemer is valid.
2- Backend that generates an on-chain datum that the smart contract can then review. It has the complexity of requiring two transactions. One that generates the on-chain datum and the deposit transaction itself. The user must also pay in advance the fee for the transaction to be performed by the backend.
In both cases the backend must have the necessary security to work on its own and sign with a special wallet.
Set the name of the UD token when creating the pool
We seek to improve the experience by allowing the pool creator to set the name of the token that will be granted as proof of deposit, instead of having a fixed name set in the code as in the current version where we have the so-called User Deposit Tokens (UD). This will allow for greater customization and tailoring of the token to each specific Pool, providing a more unique and personalized experience for users.
Contract bridging between many tokens to a single token
There are currently limits on the number of tokens with the same token but different name that can be added to each deposit. The current limit for our contracts is 20 tokens per transaction and is based on the amount of resources needed to process the transaction, as transactions with a larger number of tokens require more resources.
We propose to implement an alternative token blocking and minting contract. In this contract, the original tokens will be blocked and, in exchange, new tokens with a unique name will be minted. These new tokens will be the ones used for staking, while the original tokens will remain locked and can be retrieved by the original owner in exchange for the tokens received.
Site admin wallet management
There are many functionalities on the site that are restricted to certain wallets and these are currently set in server environment variables. To improve the management of wallets and functionality restrictions on the site, it is proposed to create a database to manage these wallets more efficiently. In this database, it will be possible to visualize and modify the configurations related to wallets and functionality access restrictions.
REST API
To bolster the seamless interaction of users and developers with our platform, we are rolling out an advanced REST API for the staking protocol. This API isn't just an ordinary interface; it is a gateway designed to be leveraged by DAOs to create their own staking smart contracts with increased ease and convenience.
With this REST API, developers and DAOs will have the ability to readily access and retrieve vital data from their staking pools and associated deposits. This includes real-time status, transaction history, and other crucial data that can aid in efficient decision-making. This feature allows DAOs to obtain specific pool details and display them in a manner that suits their platform, contributing to enhanced transparency.
However, the REST API isn't just for fetching data, it's also an enabling tool for meaningful interaction with pools and deposits. Users can perform a variety of actions such as creating new deposits, withdrawing existing ones, or executing various other interactions. Upon processing these requests, the API generates the appropriate transactions and communicates them back to the frontend initiating the API call.
The REST API offers a standardised and universally accessible interface for interacting with our protocol contracts. It's versatile and platform-agnostic, making it easy for developers and DAOs to incorporate the protocol's functionality into their own platforms or applications. Whether it's a web application, a mobile app, or any other client that can communicate with the API, users can initiate API calls from anywhere.
To further streamline the integration process, we are providing pre-built React button components. These encapsulate all the necessary functionality for invoking the REST API. With these components, developers can embed buttons in their user interfaces, initiating the corresponding API calls with a simple click. This simplifies the effort required to interact with our protocol's contracts and enhances the user experience.
Moreover, the REST API also allows DAOs to showcase their pools on any platform they prefer. They can customize the display and interaction with their staking pools based on their unique needs, leading to a more tailored experience for their users.
Testing and QA
We will perform a comprehensive internal testing using Plutus Simple Model and Tasty. This will allow us to perform unit and per-property tests on each of the contracts and redeemers present in our system. We will also be able to simulate real protocol transactions, using multiple contracts in a single transaction. Our approach focuses on defining unit cases and properties to ensure complete coverage, as well as identifying and addressing more complex interactions that can be performed using the protocol. Through these comprehensive tests, we seek to ensure the robustness and security of our protocol.
During the audit process, we will be on the lookout for any vulnerabilities or weaknesses in the design and implementation of contracts and redeemers. Should we find any flaws, we will take the necessary steps to correct them and improve the security of the system. Our ultimate goal is to build confidence in our users and ensure the integrity of our protocol.
How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?
Our proposed solution to enhance and open source Rats DAO Staking Smart Contracts addresses the challenge of limited availability of open source staking platforms in the Cardano ecosystem. By doing so, it brings several benefits to the Cardano ecosystem:
- Increased Choice and Accessibility: Opening up Rats DAO Staking Smart Contracts will provide projects and teams with more options to reward the community by staking their project tokens.
- Innovation and Community Engagement: By open sourcing the smart contracts, we foster collaboration and innovation within the Cardano community.
- Network Decentralization: A wider range of open source staking platforms encourages the decentralization of the Cardano network.
- Attracting New Users: The availability of more open source staking options is likely to attract new users to the Cardano ecosystem. This growth in adoption will strengthen the Cardano ecosystem and contribute to its long-term sustainability and success.
How do you intend to measure the success of your project?
Measuring the success of our project is multi-faceted, and it involves understanding the direct and indirect benefits that we bring to the Cardano ecosystem. Here is our approach to this task:
Quantitative Metrics:
- Adoption and Usage: A primary indicator of success is the rate of adoption of our enhanced REST API and the Rats DAO Staking Smart Contracts. By tracking the number of users and DAOs leveraging our system and the volume of staked tokens handled by these contracts, we can assess the degree of acceptance in the community.
- API Interactions: As part of our new REST API functions, we will monitor the number of requests made to the API for creating, interacting, and managing the staking smart contracts. This serves as a direct measure of its utility and efficiency in the ecosystem.
- New Staking Pools: We will track the number of new staking pools created via our system as it is an important measure of network growth and our contribution towards it.
Qualitative Metrics:
- Community Engagement: The involvement of community developers in refining and enhancing the smart contracts is a vital qualitative measure. The frequency and quality of contributions will offer insight into the ecosystem's engagement with our project.
- User Satisfaction and Feedback: Collecting user opinions and experiences is essential to measure the qualitative aspect of our project. Feedback forms, user interviews, and forum discussions will help us understand how well our services are resonating with users.
In the short term, our project aims to drive innovation within the Cardano ecosystem, boost its productivity through collaboration, and enhance the security and versatility of staking smart contracts. Our REST API and smart contracts are designed to streamline and secure the staking process, encouraging participation from both users and developers.
Over the long term, we expect to see growth in the number of users and DAOs participating in staking, thereby increasing network decentralization. The ease of creating and managing staking smart contracts through our REST API should attract new entrants, strengthening the Cardano network's resilience and growth.
Although every metric may not be quantifiable, the combination of data from usage, community engagement, user feedback, and decentralization trends will give us a holistic understanding of our project's impact on the Cardano ecosystem. We believe these measures are realistic and give us an accurate assessment of both our project's and Cardano's growth trajectories.
Please describe your plans to share the outputs and results of your project?
To share the outputs and results of our project, we have the following plans:
- Documentation and Open Source Repository: We will create comprehensive documentation on Github that details the enhancements made to the Rats DAO Staking Plutus Smart Contracts.
- Community Engagement and Education: We will actively engage with the Cardano community through various channels, such as forums, Twiter Spaces, social media platforms, and developer communities.
- Collaboration and Partnerships: We will seek collaboration opportunities with other projects, dApps, and developers within the Cardano ecosystem.
- Research and Development: The results generated from the project will serve as valuable inputs for further research and development activities.