epheph / EIP-712-swap-PoC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EIP-712 swap PoC

Uses strongly-typed signed messages to send "Uniswap orders" to a block builder (e.g. Flashbots).

i think this is how it works

Helpful stuff

  • contracts/ and backend/ require that you cp .env.example .env and modify the contents to suit your needs

  • yarn start will run backend and frontend.

  • cd contracts/ && yarn deploy-goerli

Tokens with Uniswap liquidity on Goerli

Token Address
MNY 0x7ebC3778cF08f636805D9382D6c16e79ed9F370E
MNY2 0x3041EfE098e2cde8420DD16c9fBF5bde630f6168
PMNY 0xeBa14FbBbf1B10e7dB7EA5cAdDD52160aa8873f3
WETH 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6

graph edges represent existing liquidity pools:

uniswap LP diagram

TODO

  • verify signed message
  • upgrade signed message type to V4
  • write smart contract (validator/executor) to decode tx and verify signature
  • send to uniswap from (validator/executor)
    • implement v2 functions, use SwapRouter (v2 + v3) if possible
  • send (validator/executor) tx to flashbots (not important for PoC)

About


Languages

Language:Solidity 92.1%Language:TypeScript 5.9%Language:Shell 0.8%Language:HTML 0.6%Language:CSS 0.4%Language:Makefile 0.1%Language:Nix 0.0%