Open ghost opened 9 months ago
Pining you @dvush, since you edited those files most recently
Hi! Want refund is used in the code of the mev share node if you take a look at where this variable is used. Basically, when the user wants tx to be backrun and they want to set refund percentage other than 90 they set this field.
It's used on our api when sending eth_sendPrivateTransaction where we have a way for user to configure this. The code for our api is indeed closed but essentially it converts user preferred refund into correct values for wantRefund and refundConfig
So why not use refund config?
It's the way we refund config works and how rpc endpoint refund config works.
Let's say you want to set refund like that: send x percent of the refund to address a.
On rpc endpoint and eth-sendPrivateTransaction you would set refund config to be (x, a)
On mev share mev-sendBundle you would set wantRefund = x, refundConfig = (100, a)
We want to encourage users to use private tx api and use the first convention for refund config so this detail of mev share api is not well documented
@dvush thanks for answering!
Just to be clear: When I want a refund other than 90% I never need to set wantRefund
unless it is mev_sendBundle
?
I don't quite understand the question wantRefund is a field in mev_sendBundle call so there is no place to set it outside of mev_sendBundle call.
If you are using eth_sendPrivateTx of relay.flashbots.net where you set your refund configuration call then you don't need to know that this thing exist.
can I set wantRefund in my mev_sendBundle before sending it to relay.flashbots.net?
Yes, you can
I was wondering where
WantRefund
comes from. I did a search for the entire flashbots organization and I only found matches inmev-share-node
.First I thought
WantRefund
is just an old unused property, but it must be used since users somehow must be able to specify a custom refund percentage.1) I'm assuming this property is set in the new version of the relay, which isn't open source. Is that correct? Is there a chance this repo becomes public? 2) Why don't just use
refundConfig
? Therpc-endpoint
uses it tooSpecific code snippet I'm taking about at mevshare/api.go L133:
Thanks in advance for your reply.