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!
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 -- --http <http RPC url> --mevblocker-http <mevblocker http url> --private-key <private key> --bid-percentage <percent of profit to share as gas> --order-type <Priority|DutchV2|DutchV3> --chain-id <chain id> --executor-address <executor address>
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.
Simple strategy that batches UniswapX orders together by tokenin/tokenout pair and attempts to fill using Uniswap protocol liquidity
Library for encoding, decoding, and resolving UniswapX dutch orders
Autogenerated forge bindings for UniswapX contracts
forge bind --root ../UniswapX --overwrite --ethers # replace UniswapX with the path to the UniswapX repo