Opensea-Arbitrage-Bot
Opensea-Arbitrage-Bot copied to clipboard
The MEV bot framework written in Rust is optimized for simplicity, speed, and efficiency. The improved version is specifically designed for Ethereum and has implemented an NFT arbitrage strategy, achi...

What is Opensea-Arbitrage-Bot?
At its core, Opensea-Arbitrage-Bot is architected as an event processing pipeline. The library is made up of three main components:
- Collectors: Collectors take in external events (such as pending txs, new blocks, marketplace orders, etc. ) and turn them into an internal event representation.
- Strategies: Strategies contain the core logic required for each MEV opportunity. They take in events as inputs, and compute whether any opportunities are available (for example, a strategy might listen to a stream of marketplace orders to see if there are any cross-exchange arbs). Strategies produce actions.
- Executors: Executors process actions, and are responsible for executing them in different domains (for example, submitting txs, posting off-chain orders, etc.).
Strategies
The following strategies have been implemented and fixed:
- Opensea/Sudoswap NFT Arbitrage: A strategy implementing atomic, cross-market NFT arbitrage between Seaport and Sudoswap.
Build, Test and Run
First, make sure the following are installed:
In order to build, first clone the github repo:
git clone https://github.com/WendellRyan/Opensea-Arbitrage-Bot
cd Opensea-Arbitrage-Bot
Next, run tests with cargo(Ensure that Rust is installed):
cargo test --all
In order to run the opensea sudoswap arbitrage strategy, you can run the following command:
cargo run --bin artemis -- --wss <INFURA_OR_ALCHEMY_KEY> --opensea-api-key <OPENSEA_API_KEY> --private-key <PRIVATE_KEY> --arb-contract-address <ARB_CONTRACT_ADDRESS> --bid-percentage <BID_PERCENTAGE>
[!IMPORTANT]
where
ARB_CONTRACT_ADDRESSis the address to which you deploy the arb contractBefore deploying the contract, you can fill this in as
"invalid_address"to test for any errors. However, make sure the other four parameters are filled in correctly, and the bid-percentage can be set to"0". Before making any adjustments, I recommend running the existing strategy first to familiarize yourself with how it works.
Improvements and ideas
The current version has been deeply optimized, now capable of capturing arbitrage opportunities faster and more accurately to generate profits. In the future, I plan to build more strategies on this framework, such as arbitrage between decentralized exchanges.
Contact
The program is currently working properly
If you have any ideas, please contact me:
Discord: @wendellryan