Conversation
dbaa224 to
813aa72
Compare
a5ed4b3 to
c5c0c28
Compare
chrmatt
left a comment
There was a problem hiding this comment.
The overall logic of topping up via the deposit manager looks good to me. I haven't checked a lot of the other details.
|
We could use ReentrancyGuardTransient instead of ReentrancyGuard for these contracts - it uses transient storage introduced in dencun upgrade to make the nonreentrant modifier pretty much free. Not sure how much we care since this isn't L1 |
If you think the gas savings are worth it, I'm not against making this change for all relevant contracts before we redeploy. Seems best to implement in a separate PR to main since not directly related to bidder deposit changes |
aloknerurkar
left a comment
There was a problem hiding this comment.
This is a monumental effort! Great work!
In the previous version of the core protocol, bidders deposited funds w.r.t groups of consecutive blocks known as windows. This PR updates the core protocol to allow bidders to instead make deposits per-provider.
This new design eliminates the need for each bidder node to run its own off-chain "auto-deposit" logic, which continually redeposited bidder funds into up-to-date windows. These redeposit txes would happen regardless of whether preconf bids were being settled.
Now, redeposits are only required when a bidder's deposited amount goes below their target deposit amount for a provider, specifically from preconfs being settled. Further, EIP-7702 is leveraged to automatically replenish bidder deposits on-chain during the settlement process via the
DepositManager.BidderRegistryDepositManagercontract for EIP-7702 enabled auto "top-up" logic. This on-chain mechanism replaces the previousauto-depositfeature of mev-commit bidder nodesdeposit.gologic to accommodate new bidder semanticstools/dashboardto accommodate new bidder semantics