https://github.com/flashbots/eip-712-swap-poc
https://github.com/flashbots/eip-712-swap-poc
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/flashbots/eip-712-swap-poc
- Owner: flashbots
- Created: 2022-04-01T05:05:50.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-17T22:08:56.000Z (almost 4 years ago)
- Last Synced: 2025-08-18T01:47:56.324Z (10 months ago)
- Language: Solidity
- Size: 2.07 MB
- Stars: 11
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# EIP-712 swap PoC
Uses strongly-typed signed messages to send "Uniswap orders" to a block builder (e.g. Flashbots).

## 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:

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