当前位置:网站首页>Uniswapv2 peripheral contract learning (V) -- exampleflashswap sol

Uniswapv2 peripheral contract learning (V) -- exampleflashswap sol

2022-06-09 14:01:00 MateZero

I remember a sentence from my circle of friends , If Defi It is the crown of Ethereum , that Uniswap It is the Pearl in this crown .Uniswap So far V2 edition , relative V1, Its functions are more comprehensive and optimized , However, the contract source code is not complicated . This article is for personal learning UniswapV2 Source code of a series of record articles .

One 、ExampleFlashSwap Contract introduction

The contract is for use UniswapV2 In the transaction pair FlashSwap First borrow and then return , While buying and selling assets, and UnisapV1 Trade to trade , Use the price difference to carry out arbitrage .

Two 、ExampleFlashSwap Contract source code

pragma solidity =0.6.6;

import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol';

import '../libraries/UniswapV2Library.sol';
原网站

版权声明
本文为[MateZero]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206091245531865.html