-
Notifications
You must be signed in to change notification settings - Fork 114
Feature Request: read setPreSignature orders from the blockchain (and MEV them in a good way!!) #5577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @SecurityIsHard69420666 , thank you for the request! |
Regarding Regarding
|
In my use case (Zodiac Role Modifiers) I'm calling setPreSignature indirectly through CowSwapOrderSigner, which definitely puts the full order details on the blockchain. (side note: i wonder why zodiac doesn't call setPreSignature directly :-/ (edit: it's because the zodiac contracts have to check+verify the arg conditions))
yes I'm only talking about Safe wallets. EOAs can already post orders off-chain so they don't have to worry about front-running.
These are acceptable conditions for avoiding front-running imo. I'm not saying it should be the default way of doing things, but it could be something you opt into. "follow this guide ('don't continue to use your Safe when an order is pending, and your orders must be solved in the order they were received') and use this special RPC endpoint (which shares pending tx with solvers)" ---> you can't get front-run anymore :) edit: I honestly fully admit that what I'm proposing is hacky af..... but honestly so is MEV in general. |
Did you consider using an EIP-1271 signature instead of pre-sign? That way you can prepare the order the safe is supposed to accept, generate the necessary signature using the safe and then submit both off-chain to the orderbook. This will keep the order private until it gets executed by solvers. |
I realized that the reason I have to use Zodiac's CowSwapOrderSigner contract is to check+verify the arg conditions for the order, and to be honest I don't know if Zodiac could be used with EIP-1271... but I would imagine if it could then it already would? I'm a little out of my depth here :-P |
Solvers can and should read setPreSignature orders straight from the blockchain. I don't see the point in requiring a 2nd submission to the Cow Swap Orderbook API.
MEV (the good kind)! Since submitting an order with setPreSignature allows for frontrunning :(... it would be cool if the "MEV Blocker" RPC shared the "pending" setPreSignature orders with the solvers... so they could potentially put your "setPreSignature" tx and "settleOrder" tx in the same block before anybody has a chance to frontrun! 🔥 🐄
thanks for the awesome product!
edit: i'm not sure it's possible, but maybe
edit 2: i'm wondering why solvers can't just hold onto your "pending" setPreSignature tx indefinitely until the order can be solved... but i probably just don't understand something. like yea sure we're breaking the typical flow of things... but who cares :-P? p.s.: i'm using a Safe with only 1 signer, if that matters
edit3: edit2 would only work if your order was not partiallyFillable
The text was updated successfully, but these errors were encountered: