Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a grace period of one block to the deadline for settling on chain. It also removes the use of block deadlines in computing fees and other quantities.
The PR changes two things:
surplus
,fee
, andexecution_cost
to zero was removed. For every successful settlemen, even if after the deadline by many blocks, those values will just be copies of the respective values in thesettlement_observations
table. The change tosurplus
andexecution_cost
does not have any effect on solver payments. Those values are only used for analytics. The change tofee
has an effect since it enters the computation ofnetwork_fee_eth
. Before the change, the network fee was computed to be negative and essentially equal to-protocol_fee_eth
. On the one hand, network fees were already removed from slippage using per order data. On the other hand, slippage is also modified by adding the value of network fees to reimburse solvers the cost of execution. Since network fees were computed to be negative protocol fees, instead of paying solvers those network fees they paid us protocol fees. See Potential bug with auctions being settled late #380. With the proposed change, network fees are always paid as part of slippage to the solver. This is consistent with how slippage is handled in general.The estimated impact on solver from adding a grace period is an increase in overall rewards by about 1.48 ETH in the accounting period 2024-08-06--2024-08-13.
The impact of the second change on slippage is not estimated precisely. The overcharging of protocol fees amounts to 0.6 ETH. The missing reimbursement of network fees is not estimated.
See this Dune query.
The changes should be mirrored to dune-sync and data for the accounting period starting on 2024-08-13 should be re-synced.