proposed by a strong team svoi.dev, who developed for instance timer smart contract for Free TON, led to some arguments in the defi subgroup, on the last defi weekly call and in telegram discussion group. We reached a decision that I will try to merge their proposal with the dex, to keep the dex implementation still generic but better suited for uniswap model. Here is what came out (also added two laugans points about minimum average point and free open source license):
FreeTon DEX Implementation proposal
Contest dates
- Warm-up period: mid January 2021
- Submission Stage 1 period: 22 January(00:00:00 UTC) - 28 February(23:59:59) 2020
General description
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 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 and self-governed structure of the DEX from initial launch. FreeDex can be either OB (order-book) dex, LP (liquidity provision) dex, any combination of those or any other possible yet unknown type.
Roadmap
Stages:
- Set of dex smart contracts (exchange, 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) (Stage 2)
- Complex automated market maker mechanics (Stage 3)
- Additional necessary improvements like UI/UX, governance mechanics, voting mechanics, 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 LP for LP dex implementation
- OB dex should allow user to put or cancel order, LP dex to add either external liquidity through the bridges or TIP-3 tokens
- 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 application interface development based on best practices of 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
General criteria
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, 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
Hard criteria
- 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 both exchange and liquidity provision
- Support of de-bot interface for at least testing purposes
Artifacts
- Link to github/gitlab with executable code and thorough README on how to deploy and run
- free open-source license
Soft criteria
- Good economics with working prototype
- Mostly everyday English to facilitate understanding of technical paper
- Additional web, mobile, chatbot or any other type of UI for smoother user experience
Rewards Stage 1
Place | Reward, TON |
---|---|
1 | 250,000 |
2 | 200,000 |
3 | 150,000 |
4 | 50,000 |
5 | 25,000 |
Works with average score less than 3 are excluded from prize nomination (reject counts as vote with weight 0)
Voting
- 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.
Jury rewards
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.
Governance rewards
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.
Disclaimer
Anyone can participate, but Free TON cannot distribute Tons to US citizens or US entities