flashbots / flashbots/mev-share-node

Where does `WantRefund` come from?

Open
#18 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
109
Forks
15
PR merge metrics
No merged PRs in 30d

Description

I was wondering where `WantRefund` comes from. I did a search for the entire flashbots organization and I only found matches in `mev-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`? The `rpc-endpoint` [uses it too](https://github.com/flashbots/rpc-endpoint/blob/a4e6152bb7c250ec1508459bd51572efed1859a3/server/url_params.go#L124)

Specific code snippet I'm taking about at [mevshare/api.go L133](https://github.com/flashbots/mev-share-node/blob/afe43e7c4bcb89b091aca5d1e4d20dd8f2403fa0/mevshare/api.go#L133):

```go
// send 90 % of the refund to the unmatched bundle or the suggested refund if set
refundPercent := RefundPercent
if unmatchedBundle.Privacy != nil && unmatchedBundle.Privacy.WantRefund != nil {
refundPercent = *unmatchedBundle.Privacy.WantRefund
}
```

Thanks in advance for your reply.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.