What is swap through code (swap dex)?

What is swap through code Editor\’s note: This article is from a Ethereum enthusi

What is swap through code (swap dex)?

What is swap through code Editor’s note: This article is from a Ethereum enthusiast (ID: ethfans), author: AustinPeterson, translated and proofread by Min Min & Ajian, authorized reprint of Odaily Star Daily. What is swap through code?

Swap is a decentralized exchange based on smart contracts that allows users to trade and borrow without intermediaries. This protocol is called sushiswap or “liquidity mining”. Simply put, you can deposit your liquidity tokens into a pool and earn rewards without any intermediaries. This means that you can provide any amount of assets in the pool. If the price in a certain funding pool is less than $1, you can collateralize your LP with its liquidity ETH and earn interest. When the price is higher than $1, you can mortgage your ETH to a pool and then return it to the starting point to participate in mining. If you want to know how to use this automated method, just add liquidity on Uniswap. This is because each individual pool has different pool size restrictions.

To briefly explain this concept, we need to understand what methods Swap can use to achieve these functions:

1. Swap through a function call.

2. Through an algorithm call.

3. Through a special method call.

4. Through a simple method call.

5. Set parameters through some advanced techniques, such as slider speed, gas fees, etc.

Here are two examples: UniswapV2 and Curve;

Curve is an extension solution of UniswapV2 (UniswapV1);

Curve is a tool for creating new currency markets for liquidity pools and is designed to create more efficient markets.

In the UniswapV2-V3 version, we have two types of functions: automatic exchange and non-active exchange. Automatic conversion refers to the system assets that users pay to liquidity providers in the pool through automatic conversion, and balance them through the constant loss protection strategy. Automatic conversion refers to the liquidity and assets sold immediately when the assets are not sold or sold. Since automatic conversion is not automatically enforced, ownership cannot be guaranteed, and it must be ensured that the liquidity supply remains the same as before. Automatic market makers generally charge higher fees. However, in this case, the automatic mechanism may not meet the specific needs of users, so most automatic pricing platforms do not take such risks.

On Curve, automatic conversion has the following characteristics:

– No pre-approval is required, but tokens are directly extracted from the pool;

– No trust is required, and KYC certification is not required;

– There are no security vulnerabilities or potential malicious software attacks.

Every operation on swap is publicly visible:

– You can access it as long as you have a wallet address without the risk of hacking.

In addition,

swap dex

The concept of decentralized exchange (DEX) was first proposed by the US cryptocurrency research company Messari. It uses the Swap protocol to optimize the automation and tokenization of transactions to the extreme.

In the Sushi project, most of the transaction fee income comes from Uniswap and Pancake. Pancake is an automated market maker (AMM) developed under the incentive mechanism of Sushi.

Currently, there are many similar SwapDEX projects in the market, and they all adopt the same pattern:

1. Uniswap+Bancor;

2. SushiSwap+Curve;

3. Curve-ETH-WBTC pool. Among them, USDT/HUSD liquidity providers can earn a minimum of 2% return;

4. Compound liquidity pool can earn up to 1% return on liquidity assets (COMP);

5. SushiSwapV2/ETH liquidity providers can earn a minimum fee of 5% (CRV), while Curve/ETHLP needs to pay a fee of 0.05%.

This article and pictures are from the Internet and do not represent SipPop's position. If you infringe, please contact us to delete:https://www.sippop.com/23841.htm

It is strongly recommended that you study, review, analyze and verify the content independently, use the relevant data and content carefully, and bear all risks arising therefrom.