Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mariusvanderwijden/dex
Repo containing a rough example DEX implementation
https://github.com/mariusvanderwijden/dex
Last synced: 17 days ago
JSON representation
Repo containing a rough example DEX implementation
- Host: GitHub
- URL: https://github.com/mariusvanderwijden/dex
- Owner: MariusVanDerWijden
- Created: 2024-06-12T12:40:20.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-06-18T14:29:20.000Z (5 months ago)
- Last Synced: 2024-10-06T16:41:00.679Z (about 1 month ago)
- Language: Solidity
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repo contains a toy-dex implementation.
# Docs
https://ethresear.ch/t/improving-front-running-resistance-of-x-y-k-market-makers/1281# Steps
- Copy the files into Remix
- Deploy the ERC20 contract (which provides the deployer with 1M TestTKN)
- Deploy the DEX contract (provide the ERC20 address on deployment)
- Call approve (dexAddr, 100000) on the ERC20 contract
- Call addLiquidity(100000) with 100000 wei value
- Swap as much as you like using swapETHToToken and swapTokenToETH