DEX & UNISWAP
Decentralized Exchanges
Uniswap under the Hood
Accessing Decentralized Exchanges
2/4/2021
GRAPH OF THE DAY
TOTAL VALUE LOCKED IN DEFI
Total Value Locked in DeFi protocols (TVL) now
stands above $25B, an incredible 2500% growth Y/Y.
Similarly, the number of DeFi users has surpassed 1.2M
Protocols like Uniswap and Compound claim 200-500K
users, with most other DeFi apps between 25-50K users.
DEX VOLUME
UNISWAP
Most popular decentralized exchange
August 30 surpassed major cryptocurrency exchange Coinbase in volume
after its users traded $426 million worth of cryptocurrencies in a single day
UNISWAP Uniswap under the hood
ERC20 TOKEN SWAP ON UNSWAP
UNISWAP EXCHANGE CONTRACT
MECHANICS OF SWAP
UNISWAP FACTORY CONTRACT
UNISWAP FACTORY CONTRACT IN
DETAIL
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
UNISWAP PAIR CONTRACT
UNISWAP PAIR CONTRACT (1/3)
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
UNISWAP PAIR CONTRACT (2/3)
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1,
uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data)
external;
function skim(address to) external;
function sync() external;
UNISWAP PAIR CONTRACT (3/3)
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
UNISWAP ROUTER CONTRACT
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity()
function addLiquidityETH()
function removeLiquidity()
function removeLiquidityETH()
function removeLiquidityWithPermit()
function removeLiquidityETHWithPermit()
function swapExactTokensForTokens()
function swapTokensForExactTokens()
function swapExactETHForTokens()
function swapTokensForExactETH()
function swapExactTokensForETH()
function swapETHForExactTokens()
function quote(uint amountA, uint reserveA, uint reserveB)
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut)
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut)
function getAmountsOut(uint amountIn, address[] calldata path)
function getAmountsIn(uint amountOut, address[] calldata path)
}
CHECK ACTIVITY OF THE ROUTER
CONTRACT
CHECK TRANSACTION EXECUTED
BY ROUTER
INTERACTING WITH
DECENTRALIZED EXCHANGE
ACCESSING UNISWAP DEX
WEB UI
API
SDK/Libraries
Smart Contracts
WEB UI (DEMO)
WEB UI (DEMO PART 2)
API ACCESS (DEMO)
JAVASCRIPT ACCESS DEMO
CALL FROM A SMART CONTRACT –
GET PRICE
IUniswapV2Router02 private uniswapV2router;
uniswapV2router =
IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
function getEstimatedEthForToken(address token, uint256 tokenAmount) public
view returns (uint256) {
if (token!=address(0) && tokenAmount>0) {
address[] memory path = getPathToETH(token);
uint[] memory r = uniswapV2router.getAmountsOut(tokenAmount, path);
return r[1];
} else {
return 0;
}
}
SWAP TOKEN TO ETH
// amountOutMin must be retrieved from an oracle of some kind
address[] memory path = new address[](2);
path[0] = address(DAI);
path[1] = UniswapV2Router02.WETH();
UniswapV2Router02.swapExactTokensForETH(amountIn, amountOutMin, path,
msg.sender, block.timestamp)
CALL FROM A SMART CONTRACT -
SELL
event SellToken(address token, uint256 tokenAmount);
function convertTokenToEth(address token, uint256 tokenAmount) public onlyOwner {
IERC20 erc20Token = IERC20(token);
emit SellToken(token, tokenAmount);
require(getTokenBalance(token)>=tokenAmount && token!=address(0), "Token balance");
require(erc20Token.approve(address(uniswapV2router), 0), "Approve failed");
require(erc20Token.approve(address(uniswapV2router), tokenAmount), "Approve failed");
uint256 deadline = block.timestamp + 300; // transaction expires in 300 seconds (5 minutes)
uint256 minETHAmountToReceieve = (getEstimatedEthForToken(token, tokenAmount)*8)/10; //20%
sleepage is OK
uniswapV2router.swapExactTokensForETH(tokenAmount, minETHAmountToReceieve,
getPathToETH(token), address(this), deadline);
}
QUESTIONS?
OUR NEXT MEETUP
STAY IN TOUCH
Gene Leybzon https://www.linkedin.com/in/leybzon/
https://www.meetup.com/members/90744
20/
https://www.leybzon.com

More Related Content

PPTX
Ethereum 2.0
PDF
Decentralized applications 101: How and why to build a DApp
PPTX
Blockchain Tutorial For Beginners - 2 | Blockchain Technology | Blockchain Tu...
PPTX
Erc 721 tokens
PPTX
Write smart contract with solidity on Ethereum
PPTX
Non-fungible tokens (nfts)
PDF
The Lightning Network - A gentle introduction
PPTX
Introduction to Solidity and Smart Contract Development (9).pptx
Ethereum 2.0
Decentralized applications 101: How and why to build a DApp
Blockchain Tutorial For Beginners - 2 | Blockchain Technology | Blockchain Tu...
Erc 721 tokens
Write smart contract with solidity on Ethereum
Non-fungible tokens (nfts)
The Lightning Network - A gentle introduction
Introduction to Solidity and Smart Contract Development (9).pptx

What's hot (20)

PDF
DeFi 101
PPTX
What is DeFi ? | Decentralized Finance
PDF
ERC20 Step-by-Step - Creating Your First Ethereum Token
PDF
Decentralized exchanges
PPTX
Blockchain and Cryptocurrencies
PDF
"Automated Liquidity" by Hayden Adams, Uniswap | Fluidity 2019
PPTX
What the Duck is DeFi
PDF
Creator Economy meets Crypto => Web3.0
PDF
Ethereum A to Z
PDF
Ethereum in a nutshell
PPTX
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
PPTX
Hyperledger
PPTX
NFT Marketplace: Your Complete Guide For 2022
PPTX
DAOs on Ethereum: The Future of Venture Finance
PPTX
Permissonless & Permissioned blockchain
PDF
"Decentralized Finance (DeFi)" by Brendan Forster, Dharma | Fluidity 2019
PDF
DeFi - Decentralized Finance - Wallstreet Meets Blockchain
PDF
What is Decentralized Autonomous Organization (DAO) & How DAO works?
PDF
Ethereum Solidity Fundamentals
PDF
Non-fungible tokens (NFTs)
DeFi 101
What is DeFi ? | Decentralized Finance
ERC20 Step-by-Step - Creating Your First Ethereum Token
Decentralized exchanges
Blockchain and Cryptocurrencies
"Automated Liquidity" by Hayden Adams, Uniswap | Fluidity 2019
What the Duck is DeFi
Creator Economy meets Crypto => Web3.0
Ethereum A to Z
Ethereum in a nutshell
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Hyperledger
NFT Marketplace: Your Complete Guide For 2022
DAOs on Ethereum: The Future of Venture Finance
Permissonless & Permissioned blockchain
"Decentralized Finance (DeFi)" by Brendan Forster, Dharma | Fluidity 2019
DeFi - Decentralized Finance - Wallstreet Meets Blockchain
What is Decentralized Autonomous Organization (DAO) & How DAO works?
Ethereum Solidity Fundamentals
Non-fungible tokens (NFTs)
Ad

Similar to Dex and Uniswap (20)

PPTX
Accessing decentralized finance on Ethereum blockchain
PDF
ERC20 Token Contract
PPTX
lecture7 blockchain ethereum mechanics 101
PDF
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
PDF
“Create your own cryptocurrency in an hour” - Sandip Pandey
PPTX
Ethereum
 
PPTX
Ethereum Block Chain
PPTX
Hello world contract
PDF
A Decompiler for Blackhain-Based Smart Contracts Bytecode
PDF
Block 16 - Ethereum block transaction info via aggregated views API by Block 16
DOCX
Jarmo van de Seijp Shadbox ERC223
PDF
What is a decentralised application ? - Les Jeudis du Libre
PPTX
Advanced smart contract
PPTX
Smart Contract programming 101 with Solidity #PizzaHackathon
PDF
What is a decentralised application? - Devoxx Morocco 2018
PDF
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
PPTX
Tokens 10.pptx
PPTX
Learning Solidity
PPTX
DeFi Series – Webinar 2- DeFi Primitives
PDF
Building Apps with Ethereum Smart Contract
Accessing decentralized finance on Ethereum blockchain
ERC20 Token Contract
lecture7 blockchain ethereum mechanics 101
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
“Create your own cryptocurrency in an hour” - Sandip Pandey
Ethereum
 
Ethereum Block Chain
Hello world contract
A Decompiler for Blackhain-Based Smart Contracts Bytecode
Block 16 - Ethereum block transaction info via aggregated views API by Block 16
Jarmo van de Seijp Shadbox ERC223
What is a decentralised application ? - Les Jeudis du Libre
Advanced smart contract
Smart Contract programming 101 with Solidity #PizzaHackathon
What is a decentralised application? - Devoxx Morocco 2018
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Tokens 10.pptx
Learning Solidity
DeFi Series – Webinar 2- DeFi Primitives
Building Apps with Ethereum Smart Contract
Ad

More from Gene Leybzon (20)

PPTX
Generative AI Application Development using LangChain and LangFlow
PPTX
Chat GPTs
PPTX
Generative AI Use cases for Enterprise - Second Session
PPTX
Generative AI Use-cases for Enterprise - First Session
PPTX
Ethereum in Enterprise.pptx
PPTX
ERC-4907 Rentable NFT Standard.pptx
PPTX
Onchain Decentralized Governance 2.pptx
PPTX
Onchain Decentralized Governance.pptx
PPTX
Web3 File Storage Options
PPTX
Web3 Full Stack Development
PPTX
Instantly tradeable NFT contracts based on ERC-1155 standard
PPTX
Non-fungible tokens. From smart contract code to marketplace
PPTX
The Art of non-fungible tokens
PPTX
Graph protocol for accessing information about blockchains and d apps
PPTX
Substrate Framework
PPTX
Chainlink
PPTX
OpenZeppelin + Remix + BNB smart chain
PPTX
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of Blockchains
PPTX
Oracles
PPTX
InterPlanetary File System (IPFS)
Generative AI Application Development using LangChain and LangFlow
Chat GPTs
Generative AI Use cases for Enterprise - Second Session
Generative AI Use-cases for Enterprise - First Session
Ethereum in Enterprise.pptx
ERC-4907 Rentable NFT Standard.pptx
Onchain Decentralized Governance 2.pptx
Onchain Decentralized Governance.pptx
Web3 File Storage Options
Web3 Full Stack Development
Instantly tradeable NFT contracts based on ERC-1155 standard
Non-fungible tokens. From smart contract code to marketplace
The Art of non-fungible tokens
Graph protocol for accessing information about blockchains and d apps
Substrate Framework
Chainlink
OpenZeppelin + Remix + BNB smart chain
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of Blockchains
Oracles
InterPlanetary File System (IPFS)

Recently uploaded (20)

PDF
Financial discipline for educational purpose
PDF
Pension Trustee Training (1).pdf From Salih Shah
PDF
Statistics for Management and Economics Keller 10th Edition by Gerald Keller ...
PDF
DTC TRADIND CLUB MAKE YOUR TRADING BETTER
PDF
HCWM AND HAI FOR BHCM STUDENTS(1).Pdf and ptts
PPT
KPMG FA Benefits Report_FINAL_Jan 27_2010.ppt
PDF
THE EFFECT OF FOREIGN AID ON ECONOMIC GROWTH IN ETHIOPIA
PPTX
lesson in englishhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
PDF
Buy Verified Stripe Accounts for Sale - Secure and.pdf
PPTX
General-Characteristics-of-Microorganisms.pptx
PDF
Buy Verified Payoneer Accounts for Sale - Secure and.pdf
DOCX
Final. 150 minutes exercise agrumentative Essay
PPTX
Machine Learning (ML) is a branch of Artificial Intelligence (AI)
DOCX
BUSINESS PERFORMANCE SITUATION AND PERFORMANCE EVALUATION OF FELIX HOTEL IN H...
PPTX
28 - relative valuation lecture economicsnotes
PPTX
2. RBI.pptx202029291023i38039013i92292992
PPTX
Very useful ppt for your banking assignments Banking.pptx
PPTX
OAT_ORI_Fed Independence_August 2025.pptx
PDF
2012_The dark side of valuation a jedi guide to valuing difficult to value co...
PDF
How to join illuminati agent in Uganda Kampala call 0782561496/0756664682
Financial discipline for educational purpose
Pension Trustee Training (1).pdf From Salih Shah
Statistics for Management and Economics Keller 10th Edition by Gerald Keller ...
DTC TRADIND CLUB MAKE YOUR TRADING BETTER
HCWM AND HAI FOR BHCM STUDENTS(1).Pdf and ptts
KPMG FA Benefits Report_FINAL_Jan 27_2010.ppt
THE EFFECT OF FOREIGN AID ON ECONOMIC GROWTH IN ETHIOPIA
lesson in englishhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Buy Verified Stripe Accounts for Sale - Secure and.pdf
General-Characteristics-of-Microorganisms.pptx
Buy Verified Payoneer Accounts for Sale - Secure and.pdf
Final. 150 minutes exercise agrumentative Essay
Machine Learning (ML) is a branch of Artificial Intelligence (AI)
BUSINESS PERFORMANCE SITUATION AND PERFORMANCE EVALUATION OF FELIX HOTEL IN H...
28 - relative valuation lecture economicsnotes
2. RBI.pptx202029291023i38039013i92292992
Very useful ppt for your banking assignments Banking.pptx
OAT_ORI_Fed Independence_August 2025.pptx
2012_The dark side of valuation a jedi guide to valuing difficult to value co...
How to join illuminati agent in Uganda Kampala call 0782561496/0756664682

Dex and Uniswap

  • 1. DEX & UNISWAP Decentralized Exchanges Uniswap under the Hood Accessing Decentralized Exchanges 2/4/2021
  • 3. TOTAL VALUE LOCKED IN DEFI Total Value Locked in DeFi protocols (TVL) now stands above $25B, an incredible 2500% growth Y/Y. Similarly, the number of DeFi users has surpassed 1.2M Protocols like Uniswap and Compound claim 200-500K users, with most other DeFi apps between 25-50K users.
  • 5. UNISWAP Most popular decentralized exchange August 30 surpassed major cryptocurrency exchange Coinbase in volume after its users traded $426 million worth of cryptocurrencies in a single day
  • 7. ERC20 TOKEN SWAP ON UNSWAP
  • 11. UNISWAP FACTORY CONTRACT IN DETAIL pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function createPair(address tokenA, address tokenB) external returns (address pair); }
  • 13. UNISWAP PAIR CONTRACT (1/3) interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
  • 14. UNISWAP PAIR CONTRACT (2/3) function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external;
  • 15. UNISWAP PAIR CONTRACT (3/3) event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to );
  • 16. UNISWAP ROUTER CONTRACT interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity() function addLiquidityETH() function removeLiquidity() function removeLiquidityETH() function removeLiquidityWithPermit() function removeLiquidityETHWithPermit() function swapExactTokensForTokens() function swapTokensForExactTokens() function swapExactETHForTokens() function swapTokensForExactETH() function swapExactTokensForETH() function swapETHForExactTokens() function quote(uint amountA, uint reserveA, uint reserveB) function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) function getAmountsOut(uint amountIn, address[] calldata path) function getAmountsIn(uint amountOut, address[] calldata path) }
  • 17. CHECK ACTIVITY OF THE ROUTER CONTRACT
  • 20. ACCESSING UNISWAP DEX WEB UI API SDK/Libraries Smart Contracts
  • 22. WEB UI (DEMO PART 2)
  • 25. CALL FROM A SMART CONTRACT – GET PRICE IUniswapV2Router02 private uniswapV2router; uniswapV2router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); function getEstimatedEthForToken(address token, uint256 tokenAmount) public view returns (uint256) { if (token!=address(0) && tokenAmount>0) { address[] memory path = getPathToETH(token); uint[] memory r = uniswapV2router.getAmountsOut(tokenAmount, path); return r[1]; } else { return 0; } }
  • 26. SWAP TOKEN TO ETH // amountOutMin must be retrieved from an oracle of some kind address[] memory path = new address[](2); path[0] = address(DAI); path[1] = UniswapV2Router02.WETH(); UniswapV2Router02.swapExactTokensForETH(amountIn, amountOutMin, path, msg.sender, block.timestamp)
  • 27. CALL FROM A SMART CONTRACT - SELL event SellToken(address token, uint256 tokenAmount); function convertTokenToEth(address token, uint256 tokenAmount) public onlyOwner { IERC20 erc20Token = IERC20(token); emit SellToken(token, tokenAmount); require(getTokenBalance(token)>=tokenAmount && token!=address(0), "Token balance"); require(erc20Token.approve(address(uniswapV2router), 0), "Approve failed"); require(erc20Token.approve(address(uniswapV2router), tokenAmount), "Approve failed"); uint256 deadline = block.timestamp + 300; // transaction expires in 300 seconds (5 minutes) uint256 minETHAmountToReceieve = (getEstimatedEthForToken(token, tokenAmount)*8)/10; //20% sleepage is OK uniswapV2router.swapExactTokensForETH(tokenAmount, minETHAmountToReceieve, getPathToETH(token), address(this), deadline); }
  • 30. STAY IN TOUCH Gene Leybzon https://www.linkedin.com/in/leybzon/ https://www.meetup.com/members/90744 20/ https://www.leybzon.com

Editor's Notes

  • #3: https://www.theblockcrypto.com/data/on-chain-metrics/ethereum
  • #4: https://defipulse.com
  • #5: https://www.theblockcrypto.com/linked/91539/januarys-decentralized-exchange-volumes-are-on-track-to-reach-record-highs Uniswap currently makes up 44.85% of January’s trading volume, with SushiSwap (22.19%) and Curve (12.98%) in second and third place, respectively.
  • #6: https://mpra.ub.uni-muenchen.de/103925/1/MPRA_paper_103925.pdf https://info.uniswap.org/home
  • #8: https://blog.oceanprotocol.com/the-developers-guide-to-uniswap-48fcf6e9ee1e
  • #9: https://blog.oceanprotocol.com/the-developers-guide-to-uniswap-48fcf6e9ee1e
  • #10: https://uniswap.org/docs/v2/core-concepts/swaps/
  • #11: https://uniswap.org/docs/v2/smart-contracts/factory/ https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2Factory.sol
  • #12: https://uniswap.org/docs/v2/smart-contracts/factory/ https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2Factory.sol
  • #13: https://uniswap.org/docs/v2/smart-contracts/router02/
  • #14: https://uniswap.org/docs/v2/smart-contracts/pair/
  • #15: https://uniswap.org/docs/v2/smart-contracts/pair/
  • #16: https://uniswap.org/docs/v2/smart-contracts/pair/
  • #17: Note: routers are stateless and do not hold token balances, they can be replaced https://uniswap.org/docs/v2/smart-contracts/router02/#weth https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/UniswapV2Router02.sol
  • #18: https://etherscan.io/address/0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
  • #19: https://etherscan.io/tx/0x2f87f81ff330a4a89ef0c561f869e22adc0bf94699ffb073e9b0ff1e82fbae76
  • #22: https://app.uniswap.org/#/swap
  • #23: https://info.uniswap.org/pair/0xB6909B960DbbE7392D405429eB2b3649752b4838
  • #24: https://thegraph.com/explorer/subgraph/uniswap/uniswap-v2
  • #25: Documents\NodeJS\uniswap>node get_midprice.mjs 605.28682 0.0016521093
  • #26: https://uniswap.org/docs/v2/smart-contract-integration/quick-start/
  • #27: https://uniswap.org/docs/v2/smart-contract-integration/trading-from-a-smart-contract/
  • #28: https://uniswap.org/docs/v2/smart-contract-integration/quick-start/
  • #30: LINK – decentralized oracle network