builder icon indicating copy to clipboard operation
builder copied to clipboard

Design and implement multi-tx loans

Open Ruteri opened this issue 2 years ago • 3 comments

Rationale

The feature would be a great tool for the searchers without access to huge upfront capital. It would help bring the leverage the big players have to the people.

Implementation

Looking at currently existing interfaces (ex http://flashbuilder.org/), the call is similar in spirit to bundles, and includes an additional parameter loanTo, that the builder loans its funds to for the duration of the bundle. Could be implemented as a new call and bundle type, or it could extend existing structure with an optional parameter.

Ruteri avatar Dec 12 '22 15:12 Ruteri

I found some previous discussion around multi-tx flash loans and it seems that the main concerns of miner swapping out coinbase addr's are relieved via blinded beacon blocks. But I believe there are still concerns around a reorg? My initial thought was that might be okay as long as the total loan amount is less than some cap, but I need to dig into reorgs on beacon chain some more.

dmarzzz avatar Dec 12 '22 17:12 dmarzzz

Seems dangerous to do in the presence of short-term reorgs. But I'm open to supporting this feature on the builder if there is demand and perhaps we can just let builders toggle it on or off. Perhaps you could make this 0 risk at the end of an epoch too?

bertmiller avatar Dec 13 '22 13:12 bertmiller

A loose idea: would checking the timestamp shield the loaner from reorgs? The block timestamp post merge is deterministic and a missed or reorged out block would still make the timestamp increase. Won't help with same-slot shenanigans, but if done through PBS the proposer would need to propose two blocks for the same slot, getting slashed in the process.

Ruteri avatar Dec 13 '22 13:12 Ruteri