{"id":13338157,"url":"https://github.com/SVOIcom/tonswap-SC","last_synced_at":"2025-03-11T08:32:34.783Z","repository":{"id":49163296,"uuid":"330084593","full_name":"SVOIcom/tonswap-SC","owner":"SVOIcom","description":"Smart contracts for TONSwap project","archived":false,"fork":false,"pushed_at":"2021-06-25T14:37:33.000Z","size":420,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-05T17:13:13.202Z","etag":null,"topics":["freeton","liquidity-providers","solidity","ton","tonswap"],"latest_commit_sha":null,"homepage":"https://tonswap.com","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SVOIcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-16T04:35:03.000Z","updated_at":"2023-03-03T14:40:24.000Z","dependencies_parsed_at":"2022-09-05T11:30:55.535Z","dependency_job_id":null,"html_url":"https://github.com/SVOIcom/tonswap-SC","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SVOIcom%2Ftonswap-SC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SVOIcom%2Ftonswap-SC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SVOIcom%2Ftonswap-SC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SVOIcom%2Ftonswap-SC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SVOIcom","download_url":"https://codeload.github.com/SVOIcom/tonswap-SC/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243000987,"owners_count":20219783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["freeton","liquidity-providers","solidity","ton","tonswap"],"created_at":"2024-07-29T19:15:36.906Z","updated_at":"2025-03-11T08:32:34.377Z","avatar_url":"https://github.com/SVOIcom.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n![photo_2020-12-15_20-21-41](https://user-images.githubusercontent.com/18599919/111032509-ac9fbd80-841d-11eb-9639-843ef2d758b3.jpg)\nHello there! \\\nSVOI dev team greets you and would like to present the results of created Decentralized Exchange for the FreeTON Community contest: \\\n#23 FreeTon DEX Implementation Stage 2 Contest.\n\nGoal of this work is to create Decentralized Exchange based on Liquidity Pool mechanism and develop instruments, such as \ndebot and [site](https://tonswap.com) for interacting with developed smart contracts.\n \n# Links\n[![Channel on Telegram](https://img.shields.io/badge/-TON%20Swap%20TG%20chat-blue)](https://t.me/tonswap) \n\nRepository for smart contracts compilation and deployment - [https://github.com/SVOIcom/ton-testing-suite](https://github.com/SVOIcom/ton-testing-suite)\n\nUsed ton-solidity compiler - [solidity compiler v0.39.0](https://github.com/broxus/TON-Solidity-Compiler/tree/98892ddbd2817784857b54436d75b64a3fdf6eb1)\n\nUsed tvm-linker - [latest tvm linker](https://github.com/tonlabs/TVM-linker)\n\n# tonswap-SC\nThis repository contains smart contracts that are used for ```Decentralized Exchange``` based on ```Liquidity Pairs```\n\n# Smart contracts description\n\n## Swap pair contracts\nThere are two main contracts related to swap pair - RootSwapPairContract and SwapPairContract. \\\nRootSwapPairContract is used to deploy swap pair contract, update it and store information about already deployed swap pairs to prevent dublication of swap pairs. \\\nSwapPairContract is used to implement liquidity pool swap mechanics and to provide access to it for users. \n\nBelow is short description of iterfaces and smart contracts.\n\n### Interfaces\n\nThese interfaces may be used to implement smart contracts that interact with swap pair or swap pair root contract\n\n#### [IRootSwapPairContract.sol](contracts/SwapPair/IRootSwapPairContract.sol)\n\nContains main functionality of RootSwapPairContract - deployment of swap pair\n#### [IRootSwapPairUpgradePairCode.sol](contracts/SwapPair/IRootSwapPairUpgradePairCode.sol)\n\nContains functions for swap pair contract upgrade\n\n#### [IServiceInformation.sol](contracts/SwapPair/IServiceInformation.sol)\n\nContains structure with service information\n\n#### [ISwapPairContract.sol](contracts/SwapPair/ISwapPairContract.sol)\n\nContains main functionality of SwapPairContract\n\n#### [ISwapPairDebug.sol](contracts/SwapPair/ISwapPairDebug.sol)\n\nContains debug functions of SwapPairContract which could be implemented if debug version is required\n\n#### [ISwapPairInformation.sol](contracts/SwapPair/ISwapPairInformation.sol)\n\nContains information structures used in SwapPairContract\n\n#### [IUpgradeSwapPairCode.sol](contracts/SwapPair/IUpgradeSwapPairCode.sol)\n\nContains function to upgrade swap pair code\n\n### Contracts\n\n#### [RootSwapPairContract.sol](contracts/SwapPair/RootSwapPairContract.sol)\n\nThis is RootSwapPairContract. It is used to deploy swap pairs and keep track of unique swap pairs.\n\n#### [SwapPairContract.sol](contracts/SwapPair/SwapPairContract.sol)\n\nContract implementing liquidity pair mechanism\n\n## Tokens\nUsed tokens are TIP-3 tokens initially developed by Broxus for bridges between Ethereum and TON. \\\nWe decided that it will be great not to create a ton of new TIP-3 token types and used already existing and working solution.\n\n### Interfaces\n\nInterfaces can be found at [contracts/TIP-3/interfaces/](contracts/TIP-3/interfaces)\n\n### Contracts\n\nContracts can be found at [contracts/TIP-3/](contracts/TIP-3/)\n\n## [Additional contracts](contracts/additional)\nSome additional contracts that can help you to deploy your own swap pair or tokens\n\n# Contract compilation and deployment\n\nThere are compiled contracts at [release page](https://github.com/SVOIcom/tonswap-SC/tags). You can use them for quick start. \\\nIf you want to compile smart contracts - please check repository [https://github.com/SVOIcom/ton-testing-suite](https://github.com/SVOIcom/ton-testing-suite) \\\nThere you will find instructions and instruments for smart contract compilation and testing/deploying test swap pair and debot contracts.\n\n## Pre-deployed smart contracts for tests\n\nDeployed root swap pair contract: ```0:3dc2f941650dbb757e47363109841a943c04a4824a6652b8be7377b945603137```\nDeployed test swap pair contract: ```0:12987e0102acf7ebfe916da94a1308540b9894b3b99f8d5c7043a39725c08bdf```\n\n\nIf you have any questions - feel free to ask our team in [Telegram](https://t.me/tonswap).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSVOIcom%2Ftonswap-SC","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSVOIcom%2Ftonswap-SC","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSVOIcom%2Ftonswap-SC/lists"}