paradigmxyz / artemis

A simple, modular, and fast framework for writing MEV bots in Rust.
Apache License 2.0
2.31k stars 442 forks source link

How to implement the delay strategy #44

Closed greyireland closed 1 year ago

greyireland commented 1 year ago

How to implement the delay strategy, I want to wait for the end of the block, and then send the Action to the chain, I don’t know how to implement it, do you have any suggestions?

mteam88 commented 1 year ago

Blocks are atomic..? You can't wait for the end of a block.

saguillo2000 commented 1 year ago

Hi @greyireland,

I don't know how you want to extract more value when the block is already written in the blockchain. Maybe what you want to make is a Frontrunning and running a PGA?

https://cointelegraph.com/explained/what-is-front-running-in-crypto-and-nft-trading

If this is not what you meant can you please be more detalied on how you can be more profitable when a block is already written?

greyireland commented 1 year ago

For example, if I want to do a sandwich strategy, I want to wait until the next block of 11s is about to come out, and send a big meaty package

JosepBove commented 1 year ago

https://medium.com/coinmonks/defi-sandwich-attack-explain-776f6f43b2fd

mteam88 commented 1 year ago

@greyireland In that case you can calculate the amount of time since the last block and use that. This isn't related to Artemis. Nominating to close.

greyireland commented 1 year ago

I extended the strategy trait with channel, which does not block the asynchronous process