I create a decentralized exchange (DEX) by following this Scaffold-Eth tutorial by Austin Griffith:
[ Ссылка ]
I deploy a DEX contract (with React frontend) and an ERC 20 token.
I will swap ether for ERC 20 tokens, and vice versa.
As the reserves in the DEX run low, slippage will cause the trades to become unbalanced.
The Scaffold-Eth code for this DEX is on the branch 'challenge-3-dex':
[ Ссылка ]
Github link for the DEX contract:
[ Ссылка ]
Stay tuned for Part 2, which will cover how to add liquidity into the DEX at the correct ratio.
Ещё видео!