Here is the draft for stage 1 implementation of dex proposal, feel free to give your comments and suggestions:
FreeTon DEX Implementation Stage 1 Contest
- Warm-up period: mid January 2021
- Submission Stage 1 period: 22 January(00:00:00 UTC) - 12 March(23:59:59) 2021
- Warm up period: 3 days
The goal of this contest is to prove the ability of free ton blockchain to perform fast and cheap non-custodial exchange operations such as exchange of tokens, loans, IOUs or other types of liabilities.
The Free TON DEX, or FreeDEX for short, should be general purpose and let the users/governance create an arbitrary number of order books and/or liquidity pools, manage the order and transactions fees, support different types of referral programs and of course yielding mechanics for the participation in the dex marketing and development.
Furthermore the primary differentiator of FreeDex should be support for staking through TON depool contracts and voting using TON SMV contracts, support for TIP-3 tokens or its extensions and self-governed structure of the DEX. FreeDex can be either OB (order-book) dex, LP (liquidity provision) dex, any combination of those or any other possible type.
- Set of dex smart contracts (exchange, order book, liquidity pools, etc) with mandatory debot interface and optional UI (Stage 1. Current)
- Complex liquidity pool mechanics (pool explorers, pool factories for LP dexes, cross margin and complex FOK IOC order for order-based dexes, etc) (Stage 2)
- Complex automated market maker mechanics (Stage 3)
- Additional necessary improvements like UI/UX, governance, voting or yielding mechanics, etc (Stage 4)
Implementation stage 1
Stage 1 implementation should include set of open source smart contracts for TON network which would allow:
- Exchange contracts supporting exchange function of two arbitrary tokens, either through order book for OB dex implementation or through LP for LP dex implementation
- OB dex should allow user to put, cancel, match and fill orders, LP dex to add either external liquidity through the bridges or exchange tokens between LP and user. TIP-3 tokens or its extensions should be used
- Exchange can be performed between two users or user and LP using AMM (automated market maker) for both OB and LP dexes
- All operations should be performed through debot interface but additional UI interfaces are welcome as well
Products of the work should include:
- source code of smart contracts in a public repository
- smart contracts deployed on the testnet
- description of scenarios for calls of smart contract methods for main use cases
- debot interface and/or web, mobile, chatbot or any other UI application interface based on best practices for OB or LP DEXes (adding tokens to LP, exchanging, canceling, etc)
General contest requirements
Your submission should include:
- The basic economic model and description of money flow in the system
- The general technical architecture of the solution including all of the features listed below in the hard evaluation criteria section along with the proposed customer journeys
- Detailed technical specification of the proposed implementation with the justification of the selected approach: smart contracts, integration layer, interfaces
- Deployed implementation in Free Ton devnet with ability to test the functionality using debot interface
- Name and contact information of the contestant for communication (Telegram username, e-mail)
Your work and the proposed solution must be:
- Original. It should not include more than 10% of other contestants’ works;
- Implementable. Keep in mind the peculiarities and goals of FreeTON;
- Consistent. Its elements should not contradict each other and the FreeTON Declaration of Decentralization;
- Safe. It must ensure a due level of funds security;
- Modern. Inspire by the leading market solutions.
Evaluation criteria and winning conditions
When evaluating a proposal, priority will be given to applications that will take into account the following functional, technological and technical features in describing their solutions:
- TIP-3 tokens or its extensions, as confirmation of the investment
- The system should be able to charge a commission(s) from users for transactions
- The system should be able to cancel the exchange if the operation fails at any stage
- The system should be able to cancel the exchange operation after the timeout expires
- The system should use tick timer and the messaging function on the FreeTON network
- Support for non-custody exchange of any tokens within the FreeTON network
- Support for adding liquidity to the exchange from external blockchains at least through smart contract system or using atomic swap bridges described in atomic swap contest
- Non-custody approach to exchange order books and/or liquidity provision
- Support of de-bot interface for at least testing purposes
- Good economics with working prototype
- Mostly everyday English to facilitate understanding of technical paper
- Additional web and/or mobile UI for smoother user experience
- Link to github/gitlab with executable code and thorough README on how to deploy and run
- free open-source license
Rewards Stage 1
Works with average score less than 4 are excluded from prize nomination.
- Jury members who vote in this contest must have a solid understanding of the technology. Those jurors who don’t, should not vote or choose “Abstain.”
- Jurors whose team(s) intend to participate in this contest by providing submissions lose their right to vote in this contest.
- Each juror will vote by rating each submission on a scale of 1 to 10 or can choose to reject it if it does not meet requirements or choose to abstain from voting if they feel unqualified to judge.
- Jurors will provide feedback on your submissions.
- The Jury will reject duplicate, sub-par, incomplete, or inappropriate submissions.
An amount equal to 5% of the prize fund will be divided equitably between all jurors who vote and provide feedback based on their votes’ quantity and quality. Both voting and feedback are mandatory to collect this reward.
An amount equal to 2% of the prize fund will be divided equitably between all governance members.
Procedural reminders to all contestants
- Accessibility. All submissions must be accessible for the Jury to open and view, so please double-check your submission. If the submission is inaccessible or does not fit the criteria described, jurors may reject the submission.
- Timing. Contestants must submit their work before the closing of the filing of applications. If not submitted on time, the submission will not count.
- Contact information. All submissions must contain the contestant’s contact information, preferably a Telegram username by which jurors can verify that the submission belongs to the individual who submitted it. If not, jurors may reject your submission.
- Content. The content published in the forum and the provided PDF file should not differ, except for formatting. Otherwise, jurors may reject the submission.
- Well-formed links. If your submission has links to the work performed, the content of those links must have the contestant’s contact details, preferably a Telegram username, or backlink to your submission at the FreeTON forum, so jurors can match it and verify to whom the work belongs. If not, jurors may reject your submission.
- Multiple submissions.
- Each contestant has the right to provide several submissions if they contain different approaches to the contest problem’s solving. However, if works are not unique enough or differ just in insignificant details, jurors may reject such repeating submissions.
- If the contestant wants to make an additional submission that overrides the one previously published, he must inform the Jury about this fact and indicate the correct revision to assess. In this case, only the indicated work will count. If the contestant hasn’t indicated the updated submission as the correct one, only the first one will count, the Jury will reject all the others.
- Debot consortium - GitHub - tonlabs/DeBot-IS-consortium: DeBot Interface Specifications (IS) Consortium. IS a place where community defines interfaces every DeBot browser should support.
- Debot wiki - https://en.freeton.wiki/DeBot_Specifications
- Magister Ludi debot contract - ton-labs-contracts/solidity/debots at master · tonlabs/ton-labs-contracts · GitHub
- TIP-3 specification - ton-labs-contracts/cpp at master · tonlabs/ton-labs-contracts · GitHub
Anyone can participate, but Free TON cannot distribute Tons to US citizens or US entities