Readyswap Trading terminal


ゲスト2024/05/06 19:17
フォロー

The Ready Swap aggregates decentralized exchanges’ (DEXs’) swap features and other DeFi services in one comprehensive interface to facilitate and streamline user interactions with decentralized finance on Ethereum and EVM-compatible chains including Polygon, Avalanche, Binance BNB Smart Chain (BSC), and more to come.How Swaps Work

Incorporating one or some DEXs is a popular choice to exchange one cryptocurrency for another. These DEX swaps have their own smart contracts implementing automatic token transfer based on the Automated Market Maker (AMM) model. With AMM, sellers and buyers do not have to directly interact with each other. All trades are performed using mathematical formulas; such a mechanism eliminates human errors while greatly increasing speed and efficiency.

Each DEX swap has its own pools of tokens. For a specific DEX swap, a token X can be converted into a token Y only if that DEX has a corresponding pool X-Y, and there is a sufficient balance of token Y for the swap.

Ready Swap Features

Routers are created to bring higher efficiency to swaps. Routers find one best pool for each request; better still, they can also carry out swaps in a more sophisticated manner: they split the target swap into multiple smaller ones, each to be performed on a different DEX to optimize the output.

Routers usually consist of core logic and a smart contract, the former for finding optimal swap routes and the latter for sending calls to DEXs then returning results to user wallets.

Ready Swap is designed and implemented as a router, with the aforementioned structure and functionality to help Ready users trade with more ease and greater outcome.

Optimal Trading Fees

One of the Ready Swap goals is to minimize the trading fee for users, even in a complex swap order, with the smart routing protocol. Currently, for each swap, users have to pay involved DEXs only (each DEX defines its own fee rate, normally around 0.3%). If users use Ready liquidity pools (particularly in swaps including the Ready token RYT), a fee of 0.3% will be applied to every successful swap.

Customizable Slippage Tolerance

Upon making a request on the Ready Swap, users can also specify their slippage tolerance, which is the margin of price change (between order and execution) they find acceptable. Slippage tolerance can be set anywhere between 0.1% and 20%; when not specifically defined, the default value is 0.5%.

If the execution price is within the slippage range, the transaction will be executed. If the execution price is outside the range, the swap will not occur and the user will be notified that the slippage tolerance needs to be adjusted to make the transaction possible.

Better Price Impact

Slippage occurs due to both others’ actions and the swap itself. The final difference between the price Ready Swap offers and the price of execution is expressed in percentage under the title “Price Impact” at the bottom of the swap module. If the final price impact is larger than the specified slippage, the transaction will fail.Ready Swap Components

Core Logic

The core idea behind swap routing is based on the fact that each DEX supports different liquidity pools of tokens, and that for one token pair X-Y, there may be pools on more than one DEX.

To perform a swap from token X to token Y, we can break it down into multiple sub-swaps such as X→A→B→Y, where each sub-swap can be carried out on a different DEX.

Each pool normally has 2 tokens, which can be considered 2 nodes. Exchanges between the 2 tokens can happen in either direction (X→Y or Y→X). The pool collection of DEXs can be presented as a weighted graph, with the weight of each path depending on the exchange rate.

The problem of optimizing a swap becomes the problem of finding the shortest path from token X to token Y that can produce the highest output.

For each swap request, a graph is built based on the instant liquidity of pools.

Smart Contract

The smart contract is built according to the standard of the most renowned swap routers. It consists of the following basic functions.

Read functions:

feeRate: get the fee rate for this swap route.

getAmountsOut: get the final output volume at the current time of the swap, given a path.

getAmountsOutLP: get the final output volume at the current time of the swap, given a path and output token pair.

The Ready Swap smart contracts are deployed on different networks to support a wide range of swap needs. Currently, there is one for Polygon; more smart contracts on other networks and their addresses will be added to the list.

Network

Ready Smart Contract Address

Polygon

0x2286e63fd0701fc219686b5ba6bb4d4a6e8ed35b

シェア - Readyswap Trading terminal

ゲストさんをフォローして最新の投稿をチェックしよう!

フォロー

0 件のコメント

この投稿にコメントしよう!

この投稿にはまだコメントがありません。
ぜひあなたの声を聞かせてください。