Skip to content

Sample Artemis bot to fill UniswapX orders using on-chain liquidity

License

Notifications You must be signed in to change notification settings

Uniswap/uniswapx-artemis

 
 

Repository files navigation

UniswapX Atomic Filler

This is a sample Artemis bot that fills UniswapX orders atomically using Uniswap v2 and v3 liquidity.

Feel free to fork and modify to run any strategies you wish to fill UniswapX orders!

Usage

First you must deploy an executor contract that implements the IReactorCallback interface. This sample currently uses the provided SwapRouter02Executor.

Then update the address constant in uniswapx_strategy to point to your executor contract.

Finally, run the bot with the following command:

cargo run -- --wss <websocket RPC url> --private-key <private key> --bid-percentage <percent of profit to share as gas>

Collectors

Collects new blocks as they are confirmed. Similar to the base one in Artemis-core but includes timestamp data to resolve dutch decays

Collects new executable UniswapX orders as they are posted.

Finds on-chain AMM routes to fill UniswapX orders. Ran in a separate collector thread as these can be slow and don't want to block other processing.

Strategies

Simple strategy that batches UniswapX orders together by tokenin/tokenout pair and attempts to fill using Uniswap protocol liquidity

Crates

Library for encoding, decoding, and resolving UniswapX dutch orders

Autogenerated forge bindings for UniswapX contracts

About

Sample Artemis bot to fill UniswapX orders using on-chain liquidity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%