Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dazhbog - Perpetual Futures Exchange #2338

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 184 additions & 0 deletions applications/Dazhbog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# Dazhbog - Perpetual Futures Exchange

- **Team Name:** [Ceres Blockchain Solutions](https://ceresblockchain.solutions)
- **Payment Details:**
- **DOT**: 15TBFmf446DMSptES19SC97yLbJXjePZRkoeysFyX7nbvZ7k
- **Payment (USDT)**: 15TBFmf446DMSptES19SC97yLbJXjePZRkoeysFyX7nbvZ7k
- **[Level](https://github.com/w3f/Grants-Program/tree/master#level_slider-levels):** 2

## Project Overview :page_facing_up:
### Overview
- Dazhbog is a decentralized perpetual futures exchange platform on the Hydration parachain within the Polkadot ecosystem.
- The platform allows users to trade perpetual futures contracts in a decentralized manner, leveraging the security, scalability, and interoperability of the Polkadot network. By integrating into the Hydration parachain, Dazhbog aims to provide a seamless and efficient trading experience without relying on centralized intermediaries.
- Dazhbog's core concept and technical feasibility were rigorously validated. Our project secured first place in the DeFi category at the Polkadot Prodigy hackathon (https://www.polkadotprodigy.com), a prestigious competition within the Polkadot ecosystem. Here is the link https://x.com/PolkadotProdigy/status/1800506214658494794 of the Twitter post where the winner was announced. This achievement demonstrates the extensive research conducted and the project's potential. The recognition highlights the traction Dazhbog has gained within the Polkadot community, further motivating our team to pursue its development.
- Dazhbog will be built using Substrate, ensuring it is natively compatible with the Polkadot ecosystem. The project will be deployed as a set of pallets on the Hydration parachain.
- Our team strengthened with a Polkadot Blockchain Academy 2024 graduate, is passionate about advancing the decentralized finance (DeFi) landscape by creating innovative and accessible financial tools. We believe that decentralized perpetual futures exchanges are a crucial component of the DeFi ecosystem, providing users with new opportunities for trading and hedging.
- Our initial idea was to apply for the Decentralized Futures program with Dazhbog as a whole project. However, after internal consultations and analysis, we decided to proceed step by step as we started, first validating the idea at the Polkadot Prodigy hackathon, and then applying for a Level 2 grant for the Proof-of-Concept of Dazhbog.

### Project Details
- Pitch Deck - https://drive.google.com/file/d/1GcV3rve6ChxUiNDFok5VImYQzNo-LgWT
- Whitepaper - https://drive.google.com/file/d/14xV1bsHz5rH5NibBrFE6MMjqCUGLLO_9
- Data models/API specifications of the core functionality - [Dazhbog Specification](https://docs.google.com/document/d/18qyD5qX0hcTbDlv2d6t_4xh5SUxjoZXibi6qiRHo2oM/edit?usp=sharing)
- An overview of the technology stack to be used; Documentation of core components, protocols, architecture, etc. to be deployed; PoC/MVP or other relevant prior work or research on the topic - [Dazhbog Details](https://docs.google.com/document/d/1qtdjkdnCTxBeItkUi-Wn5ve83P147x5fNhN7rqgRGog/edit?usp=sharing)
- What your project is not or will not provide or implement. This is a place for you to manage expectations and clarify any limitations that might not be obvious.<br></br>
In the PoC, Dazhbog will not implement an additional Oracle module; instead, it will use spot prices from an external service. Backend services for event monitoring will be excluded from the PoC as they are not essential. The Admin module will have basic user and admin roles for the PoC version, with plans to expand to more roles in the future. Technical documentation will include an architecture overview and platform setup instructions, but will not contain detailed tutorials or code examples.
In the production-ready version, Dazhbog will integrate with other features on the Hydration parachain, such as those for DEX, liquidity, price discovery, etc. To ensure ease of implementation and seamless operation with the Hydration parachain, Dazhbog will utilize existing, tested, and proven functionalities rather than developing its own solutions for these features.

### Ecosystem Fit

- Dazhbog fits into the Polkadot ecosystem as a decentralized financial platform specifically designed for trading perpetual futures contracts. By deploying as one or more substrate pallets on the Hydration parachain, Dazhbog enhances the DeFi landscape within Polkadot
- Our target audience includes all individuals who use DeFi, as they will find new opportunities trading on Dazhbog. This encompasses our team, who are deeply invested in using and improving the platform to meet the highest standards. Additionally, newcomers to DeFi who are eager to explore advanced financial instruments in a user-friendly and secure environment, Dazhbog aims to attract a diverse range of users, from experienced DeFi enthusiasts to those just beginning their journey in decentralized finance.
- Dazhbog addresses the growing demand for advanced financial instruments within the DeFi community.
- In related ecosystems like Ethereum, projects such as dYdX and GMX Protocol offer decentralized perpetual futures trading. However, on Polkadot, there are no competitors that provide the advanced functionalities of Dazhbog. Our platform is designed to integrate with the well-established Hydration parachain, which boasts the highest TVL in the Polkadot DeFi ecosystem.

<p align="center">
<img src="https://github.com/Ceres-Blockchain-Solutions/W3F-Grants-program/assets/16464173/9ff920dc-583f-4ab0-a545-f3abf330f77e" />
</p>

- Our long-term vision for Dazhbog is to become a leading platform for decentralized perpetual futures trading within the Polkadot ecosystem. We aim to continuously enhance the platform by integrating new features, such as additional trading pairs, advanced analytics tools, and improved security measures. To ensure the platform's sustainability and growth, we will build a strong community of users and developers, fostering collaboration and innovation. Ultimately, our goal is to contribute significantly to the DeFi space, providing a reliable and advanced trading platform that meets the evolving needs of the global financial community.

## Team :busts_in_silhouette:
### Team members

- Rastko Misulic - Dev Team leader
- Danijel Radulovic - Ceres Blockchain Solutions CTO (will oversee the project and ensure that all requirements are met)
- Ognjen Aleksic - Polkadot Blockchain Academy Graduate 2024
- Srdjan Djukanovic
- Strahinja Stanivuk
- Designer

### Contact

- **Contact Name:** Danijel Radulovic
- **Contact Email:** [email protected]
- **Website:** https://ceresblockchain.solutions

### Legal Structure

- **Registered Address**: Cvijićeva 79/6, 11000 Belgrade, Serbia
- **Registered Legal Entity**: Ceres Blockchain Solutions LLC

### Team's experience

- **Veles - funded by Polkadot OpenGov** (https://polkadot.polkassembly.io/referenda/496) - Veles pallet for enhancing the carbon credit market within the Polkadot ecosystem. A reliable, transparent solution for carbon credit management, leveraging blockchain to ensure accuracy and security in carbon credit issuance and trading.
- Ceres dApps - Ceres is an in-house project which is intended as a DeFi service provider in the Polkadot ecosystem. The Ceres dApps platform includes services such as Liquidity Locker and Token Locker.
- Ceres Launchpad - The Launchpad platform is the first station for new projects on the network. With Launchpad, new projects can easily launch their tokens on Polkaswap and users get more security because the Ceres Liquidity Locker and Ceres Token Locker are integrated.
- Demeter Farming Platform - The Demeter Farming platform is the first of its kind. The unique feature of this platform is the user's ability to farm with the same liquidity in multiple pools. The Platform also provides Farming-as-a-Service, which means that every project can create its farming/staking pools without coding.
- DEO Arena - The DEO Arena is a Play-to-Earn game. In-game currency is the token Demeter (DEO). Players spawn in the arena and the goal is to eliminate opponents using different weapons. Each player enters the match with a certain amount of DEO tokens, which are taken by the winner at the end.
- Hermes Governance System - The Governance platform is a tool for implementing the concept of decentralization in the Hermes DAO. Any user holding Hermes (HMX) tokens above a set limit is able to create a poll. Likewise, each voter who has more than the set minimum amount of Hermes (HMX) tokens, has the same voting power as anyone else.
- Ceres Tools - Ceres Tools is a platform which displays data from the Polkaswap DEX. Users are able to track tokens prices, liquidity pairs, pool details, as well as 24hr volume for each pair and for all available pairs. The platform is also available in the form of a mobile application for Android and iOS.
- Apollo Protocol - The Apollo Protocol is the lending and borrowing platform which enables its users to deposit and borrow assets. Depositors can provide liquidity and secure passive income through interest, while borrowers can leverage their assets without selling them and pay interest for this service.

Notably, Ceres has been predominantly active on Polkadot parachains, where they have successfully delivered most of their projects. This experience underlines their proficiency in navigating these platforms' unique ecosystems, contributing to their reputation as a versatile and capable blockchain developers. Their work, known for supporting multi-chain interoperability and innovation, aligns with Ceres' objectives of fostering a more accessible, efficient, and interconnected blockchain landscape.

We have collectively participated in numerous DeFi projects, gaining deep insights and hands-on experience in trading, liquidity provision, and protocol development. Our team includes the Polkadot Blockchain Academy graduate, who has contributed to various Polkadot and Substrate-based projects, and he is also a Master in Computational Finance student who has worked on algorithmic trading systems, financial modeling, and risk management tools. Additionally, our DeFi veterans have been involved in the ecosystem since its early days, their practical knowledge of user needs and market dynamics shapes Dazhbog’s user-centric design and functionality. By leveraging our team's diverse experience and expertise, we are well-equipped to develop, enhance, and promote Dazhbog, ensuring it meets the highest standards and serves the needs of the DeFi community effectively.


### Team Code Repos

- https://github.com/CeresEcosystem - Ceres Tools and Apollo Protocol Frontend are public
- https://github.com/Ceres-Blockchain-Solutions - Veles Pallet and Svarog (Substrate runner)
- https://github.com/sora-xor/sora2-network - Ceres dApps, Launchpad, Farming Platform, Apollo Protocol etc.
<br/><br/>
- Rastko - https://github.com/RastkoCBS
- Danijel - https://github.com/DanijelCBS
- Ognjen - https://github.com/OgnjenCBS
- Srdjan - https://github.com/SrdjanCBS
- Strahinja - https://github.com/Str4LeGit


### Team LinkedIn Profiles
- Ceres Blockchain Solutions - https://www.linkedin.com/company/ceres-blockchain-solutions-llc
- Rastko - https://www.linkedin.com/in/rmisulic/
- Danijel - https://www.linkedin.com/in/danijel-radulovic-b2529a172/
- Ognjen - https://www.linkedin.com/in/ognjen-aleksi%C4%87-504503251/
- Srdjan - https://www.linkedin.com/in/srdjan-djukanovic-546093b5/
- Strahinja - https://www.linkedin.com/in/strahinjastanivuk/


## Development Status :open_book:

Dazhbog's core concept and technical feasibility were rigorously validated. Our project secured first place in the DeFi category at the Polkadot Prodigy hackathon (https://www.polkadotprodigy.com), a prestigious competition within the Polkadot ecosystem. Here is the link https://x.com/PolkadotProdigy/status/1800506214658494794 of the twitter post where the winner was announced. This achievement demonstrates the extensive research conducted and the project's potential. The recognition highlights the traction Dazhbog has gained within the Polkadot community, further motivating our team to pursue its development.

While the initial prototype leveraged ink! contracts during the hackathon (available on [GitHub repository](https://github.com/RastkoCBS/dazhbog)), the current implementation plan utilizes Substrate for a more robust and scalable solution.

## Development Roadmap :nut_and_bolt:
### Overview
The Dazhbog proof of concept will encompass core functionalities of a Decentralized Perpetual Futures Exchange, such as position opening/closing, liquidation, simple settlements, and position management. Advanced mathematics, oracles, and similar components will not be included in the PoC.

Modules which will be implemented in the PoC:
- Trading Engine: Implements the core trading logic
- Market Module: Handles market-related functionalities
- Positions Management: Manages users' open positions
- Liquidation Module: Handles liquidation processes for margin positions to maintain solvency.
- Fees Module: Manages fee calculations and distributions for trades and other platform activities.
- Margin Module: Facilitates margin trading functionalities, including leverage and collateral management.
- Revenue Collection: Manages the collection and distribution of trading fees and other revenue streams.
- User Interface: Provides user-friendly interfaces for traders to interact with the exchange.
<br/><br/>
- **Total Estimated Duration:** 2.5 months
- **Full-Time Equivalent (FTE):** 2.5 FTE
- **Total Costs:** 50,000$ (This is the total cost for PoC development; because we are applying for a Level 2 grant, it is planned that $30,000 will be funded by the grant and $20,000 by our team)

### Milestone 1 - Setup modules for core development work

- **Estimated duration:** 3 weeks
- **FTE:** 2 FTE
- **Costs:** 7,000 USD

| Number | Deliverable | Specification |
| -----: | ----------- | ------------- |
| **0a.** | License | Apache 2.0 / GPLv3 / MIT / Unlicense.
| **0b.** | Documentation | We will provide both **inline documentation** of the code and a basic **tutorial** that explains how Dazhbog functionality will be integrated with other pallets.
| **0c.** | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness.
| **0d.** | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone.
| 1. | Project plan with requirements | Analyze project requirements and create a detailed plan. |
| 2. | Environment architecture plan | Analyze environment (Hydration parachain). |
| 3. | Initial design documents and architecture | Develop initial product design and architectural plan. |
| 4. | Configured development environment | Configure development environment and set up workflows. |
| 5. | Setup for core development work | Develop Trading Engine and Market Module. |

<br/><br/>
### Milestone 2 - Core development work

- **Estimated duration:** 5 weeks
- **FTE:** 2 FTE
- **Costs:** 11,320 USD

| Number | Deliverable | Specification |
| -----: | ----------- | ------------- |
| **0a.** | License | Apache 2.0 / GPLv3 / MIT / Unlicense.
| **0b.** | Documentation | We will provide both **inline documentation** of the code and a basic **tutorial** that explains implemented Dazhbog modules.
| **0c.** | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness.
| **0d.** | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone.
| 1. | Implemented core functions | Develop Positions Management and Liquidation Module. |
| 2. | Implemented features needed for risk management of the platform | Develop Fees Module, Margin Module and Risk Management. |
| 3. | Implemented collection and distribution of trading fees | Develop Revenue Collection. |

<br/><br/>
### Milestone 3 - Backend & Frontend implementation; Finishing PoC modules; Final testing & Deployment

- **Estimated duration:** 3 weeks
- **FTE:** 3.5 FTE
- **Costs:** 11,680 USD

| Number | Deliverable | Specification |
| -----: | ----------- | ------------- |
| **0a.** | License | Apache 2.0 / GPLv3 / MIT / Unlicense.
| **0b.** | Documentation | We will provide both **inline documentation** of the code and a basic **tutorial** that explains how a user can spin up one of our Substrate nodes and send test transactions or test it on live Testnet.
| **0c.** | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness.
| **0d.** | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone.
| 0e. | Article | We will publish an **article** about what was done/achieved as part of the grant and call community to test and validate Dazhbog PoC, which is indeed the main goal of the project. |
| 1. | Working backend part of Dazhbog platform | Implement necessary modules and utils on the backend. |
| 2. | User-friendly interface which ensures an intuitive user experience | Design user-friendly interface of Dazhbog platform. |
| 3. | User interface of Dazhbog platform | Create a Dazhbog platform according to design. |
| 4. | Completed unit tests and results | Conduct thorough unit tests to ensure code quality. |
| 5. | Integration test reports | Integrate different modules and test their interoperability. |
| 6. | Revised code with bugs fixed | Fix any bugs or issues found during testing phases. |
| 7. | Deployed Dazhbog pallet on the testnet | Deploy the pallet to the testnet for live testing. |

## Future Plans
- After successfully completing and verifying the PoC, our plan is to apply for a Level 3 grant to build the entire working product.
- Once the full product is built, we plan to finance Dazhbog through a combination of strategies. Initially, we will leverage grants and funding from Polkadot’s ecosystem support programs to cover development and launch costs. Post-launch, we intend to implement a fee model where a small percentage of trading fees will be allocated towards the project's maintenance and further development.
- In the short term, our focus is on completing the development and integration of Dazhbog with the Hydration parachain. We will launch a series of marketing campaigns to raise awareness and attract users to our platform. This includes educational content, tutorials, and community engagement through social media and forums to help new users understand and utilize Dazhbog effectively.
- Our long-term vision for Dazhbog is to become a leading platform for decentralized perpetual futures trading within the Polkadot ecosystem. We aim to continuously enhance the platform by integrating new features, such as additional trading pairs, advanced analytics tools, and improved security measures. To ensure the platform's sustainability and growth, we will build a strong community of users and developers, fostering collaboration and innovation. Ultimately, our goal is to contribute significantly to the DeFi space, providing a reliable and advanced trading platform that meets the evolving needs of the global financial community.
Loading