Image for post
Image for post

Dear OneSwap users,

ONET, a governance token issued by OneSwap on the TRON network, has been officially launched today. ONET is an independent token irrelevant with ONES issued by OneSwap on Ethereum.

The total amount of ONET is fixed at 100 million. 40% of OneSwap’s transaction fees on the TRON network is automatically used to repurchase and burn ONET.

The initial circulation of ONET is 0. The distribution and circulation of ONET are as follows:

Image for post
Image for post

Those with more than 1% of the total ONET can initiate proposals, and any user holding ONET can vote for or against a proposal. The voting lasts for three days, with one token for one vote. …


Image for post
Image for post

Dear OneSwap users,

After nearly a month of development and testing, OneSwap has completed the compatibility and deployment of the TRON network. OneSwap now officially supports the TRON network and TRC20 tokens trading since November 14, 2020 (UTC).

The TRON network is a faster and cheaper smart contract network. It will greatly accelerate OneSwap’s transaction speed, cut transaction fees, and cater to users’ transaction needs with more diverse asset options.

While improving the trading experience, the support for the TRON network on OneSwap has also promoted its DeFi ecosystem construction on various blockchains and considerably enriched its application scenarios. …


Image for post
Image for post

This article mainly introduces how to use javascript to write a simple offline arbitrage robot to make a risk-free profit in various decentralized exchanges. This automated program does not have a production environment test. It is only for research. Readers assume sole responsibility for the potential risks.

Decentralized Exchange

Two decentralized exchanges are used in the project: UniSwapand OneSwap; with the function of flashSwap provided by UniSwap, risk-free arbitrage can be implemented in various decentralized exchanges.

  • flashSwap: Simply put, a user borrows a certain token from UniSwap’s trading pair pool and calls the pre-deployed arbitrage contract for the risk-free arbitrage with the fund pool of other decentralized exchanges. After that, the borrowed assets of equivalent value are refunded. …


Image for post
Image for post

This series of articles summarizes in detail the various practical experiences and skills learned/accumulated during the development of the OneSwap project, and emphasizes one point: It is not difficult to develop smart contracts on Ethereum using the Solidity programming language, yet it is not easy to develop gas-efficient and bug-free smart contracts. If that is your goal, in addition to following the best practices and techniques we introduced earlier, it is also necessary to fully test the code, and an effective tool can greatly facilitate the development. Truffleis such a one-stop tool, which integrates many functions such as dependency management, unit testing, project build, project deployment, and a wealth of third-party plug-ins. In view of Truffle’s comprehensive documentation, this article will not focus on its basic usage. …


Image for post
Image for post

For programmers, these four operations are commonplace:

  1. Create a symbolic link (Linux) or shortcut (Windows) for the program, and click this symbolic link or shortcut to start the program
  2. Use a dynamic link library to reduce the size of executable files
  3. Regularly upgrade the operating system and applications, to enhance functions, and apply security patches
  4. Source or exec another script in a script, and use environment variables to pass information to it

These operations seem unrelated to each other, but in Solidity, to achieve similar effects, we need the same mechanism: delegatecall.

The delegatecall in Solidity is so special that there is no direct corresponding concept to it in other programming languages. It is difficult to understand, even for programmers. In this article, we use the above four operations as an analogy to understand it. …


Image for post
Image for post

The Solidity language is easy to learn, and so is to write Ethereum smart contracts using Solidity. But it is very difficult to write smart contracts that are completely free of security risks. To help Solidity programmers write more robust smart contracts, Franz Vollandsummarizes 14 commonly used Solidity patterns. The OneSwap project has fully drawn on these design patterns in its development, and also created several new patterns. This article will introduce some of these patterns summarized by Franz Volland and their specific applications in OneSwap. The following is a list of these 14 patterns:

Behavioral Patterns


Dear OneSwap users,

OneSwap has been online for more than a month. Despite the recent recession in the DeFi boom, we are still confident of the prospects of DEX and committed to proving OneSwap’s value through solid actions. In addition to continuous optimization in the product, we have been systematically deploying OneSwap on the Tron network for the past days.

When it was first launched, OneSwap creatively rolled out order mining in the DeFi field by virtue of its innovative advantages of the AMM (automated market-making) model combined with on-chain order book”, attracting a large number of users and injecting vitality into this platform. …


Introduction

As we all know, the blockchain world follows such a principle: Code is law. Ethereum smart contracts developed on Solidity contain a series of storage states to support the functions of Dapp; during the services provided by Dapp, due to the absence of censorship and decentralization of the blockchain, any organization or individual can call it at will. …


The difference and connection between the DApp and App

DApp is an application that works on the chain. At first glance, laymen will think that users need to interact directly with the blockchain without the front and back ends which are necessary in traditional Apps. But that is not true. Just like traditional Apps, the Dapp still requires a webpage or mobile application as a front-end interface and a back end interacting with the front end.

DApp needs a front end, which is easy to understand, because direct interaction with the blockchain requires handwritten scripts, a skill barrier so high that only programmers can manage. …


ERC20 is a standard of smart contract tokens introduced as an Ethereum Improvement Protocol (EIP-20) on Ethereum. It has formulated a set of token functions, and aims at standardizing token functions and helping improve tokens’ compatibility among wallets and decentralized exchanges.

The functions included in the ERC20 specification are as follows:

About

OneSwap

A fully decentralized exchange protocol on Smart Contract, with permission-free token listing and automated market making.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store