Contest proposal:
Implementation of the Uniswap analogue on the FreeTON blockchain (TonSwap)
Contest dates:
Submission period: five months since contest starts
Short description:
The purpose of this contest is the development and implementation of an analogue of Uniswap (Liquidity pool) on the FreeTON blockchain on the terms prescribed in this contest.
Type:
Contest
Motivation:
There is a need to create a quality exchange platform for assets such as tokens, loans, IOUs or other types of liabilities.
The decentralized exchange, built along the lines of the existing Uniswap platform, will become the main service for other decentralized applications such as decentralized borrowing / lending services, payment solutions, derivatives trading and other passive income generation.
In the previously held contest “# 6 FreeTon DEX Architecture & Design” (Free TON Community) some participants presented developments and ideas for the implementation of uniswap analogues on the FreeTON blockchain.
These materials can be used to complete the task of this contest.
Roadmap
Stages of the development and implementation of analogue of Uniswap on the FreeTON blockchain:
- Liquidity pool (STAGE 1)
- Pool factory (pairs) (STAGE 2)
- Pool Explorer (pairs) (STAGE 3)
- Governance voting system (STAGE 4)
General requirements:
Your submission should include:
- 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 1;
- Safe. It must ensure a due level of funds security;
- Modern. Inspire by the leading market solutions.
Terms:
Uniswap is an automated liquidity protocol powered by a constant product formula and implemented in a system of non-upgradeable smart contracts on the Ethereum blockchain.
It is necessary to develop an automated liquidity management protocol based on a constant formula and providing access to instant liquidity. The closest analogue of popular DeFi projects is Uniswap.
The proposal should contain a detailed description of the solution architecture, taking into account the peculiarities and goals of FreeTON.
The design and interface should use the best practice of uniswap, but design and layout projects should be created individually for the project without using ready-made layouts and 100% copy-paste. Design and layout should be done in the style of the FreeTON project and using the accepted FreeTON logo and colors guidelines (FreeTON Logo – Google Drive).
Road map
Stages:
- Liquidity pool (STAGE 1)
- Pool factory (pairs) (STAGE 2)
- Pool Explorer (pairs) (STAGE 3)
- Governance voting system (STAGE 4)
1. Liquidity pool.
Designing the hierarchy of the smart contract tree for DEX, visualizing the scheme. Implementation of smart contracts:
- multicurrency storage of TIP-3 tokens;
- exchange pool (pair) with the ability to manage the token exchange chain (sequential exchange in several pairs);
The product of this stage should be:
- source code of smart contracts in a public repository;
- smart contracts deployed on the testnet;
- dependency diagram;
- description of scenarios for calls of smart contract methods for main use cases;
- web application interface development based on best practice of Uniswap
- web application with functionality: exchange of tokens within a pair, as well as an interface for adding liquidity to a pair
Acceptance of works will be carried out by calling smart contract methods from the CLI or from the blockchain explorer, in accordance with the provided scripts, as well as by accessing all available elements of the web interface, in accordance with the provided scripts.
The implementation period is 2 months.
2. Pool factory (pairs)
Design and implementation of service smart contracts for creating new pools (pairs) by network users, including:
- functionality of organizing the creation of new exchange pairs;
- web application with the functionality of creating a new pair
The product of this stage should be
- source code of smart contracts in a public repository;
- smart contracts deployed on the testnet
- web application with original design, deployed on the developer’s server.
Acceptance of works will be carried out by calling smart contract methods from the CLI or from the blockchain explorer, in accordance with the provided scripts, as well as by accessing all available elements of the web interface, in accordance with the provided scripts.
The implementation period is 1 month.
3. Pool Explorer (pairs)
Development of a web explorer application for exchange pools (pairs).
The application should provide the ability to quickly obtain statistics for the entire project, as well as for selected pairs, for selected tokens, for wallets.
- list of all pairs
- liquidity
- volume
- top tokens
- top pairs
- last transactions (all pairs)
- total liquidity (by token)
- volume 24 hours (by token)
- transactions 24 hours (by token)
- all token transactions (in different pairs)
- Top Pairs (by token): liquidity / volume 24 hours / volume 7 days / fees 24 hours
- Total Liquidity (per pair)
- Volume (24hrs) (by pair)
- Fees (24hrs) (by pair)
- Pooled Tokens the number of tokens currently in the pool of types 1 and 2 (pairwise)
- All transactions (with filters: All Swaps Adds Removes Total Value Token Amount Token Amount) (by pair)
- Pair Information (link to contracts)
- Top Liquidity Positions (wallet address / pair / volume) (by wallets)
The product of this stage should be a web application deployed on the developer’s server.
Acceptance of works will be made by accessing all available elements of the web interface, in accordance with the provided scripts.
The implementation period is 1 month.
4. Governance voting system
Design and development of a smart contract, the release of an internal token, as well as a voting web application.
The product of this stage should be:
- source code of smart contracts in a public repository;
- smart contracts deployed on the testnet;
- web application with original design, deployed on the developer’s server.
The implementation period is 1 month.
The criteria for assessing the quality of the solution in the future will include:
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, a unique TIP-3 token (analogue of LP) is also issued;
- The system should be able to charge a commission from users for transactions;
- To be able to cancel the exchange if the operation fails at any stage;
- Be able to cancel the exchange operation after the timeout expires;
- Using unrelated messages and tick timer;
- Using 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
Soft criteria
- Good economics with working prototype
- Mostly everyday English to facilitate understanding of technical paper
Artifacts:
Link to github/gitlab with executable code and thorough README on how to deploy and run
The following awards for the teams’ work that passed the quality assessment will be:
- Successful implementation of the first stage (“Liquidity Pool”):
- 1 place - 225.000 ТОН
- 2 place - 150.000 ТОН
- 3 place - 112.500 ТОН
- Successful implementation of the second stage (“Factory of pools (pairs)”)
- 1 place - 150.000 ТОН
- 2 place - 100.000 ТОН
- 3 place - 75.000 ТОН
- Successful implementation of the third stage (“Pool Explorer (pairs)”)
- 1 place - 112.500 ТОН
- 2 place - 75.000 ТОН
- 3 place - 55.000 ТОН
- Successful implementation of the fourth stage (“Governance voting system ”)
- 1 place - 75.000 ТОН
- 2 place - 55.000 ТОН
- 3 place - 37.500 ТОН
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.
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.
Contacts:
telegram - @lailune (Telegram: Contact @lailune )