feat: update Ring0 bundle assembly for per-party relayer fees#1418
Open
feat: update Ring0 bundle assembly for per-party relayer fees#1418
Conversation
Update build_ring0_internal_settlement_bundle to set external relayer fee to zero and sign both fees into the executor digest. Update build_ring0_external_settlement_bundle to derive the internal relayer fee from the bounded match result's token pair and use the externally-provided fee rate for the external party. Both executor signature builders now take internal_relayer_fee + external_relayer_fee parameters to match the updated contract digest format. Depends on renegade-contracts ABI changes (per-party fee fields on PublicIntentPublicBalanceBundle).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Update Ring0 settlement bundle assembly to support distinct internal and external relayer fees, matching the contract changes in renegade-fi/renegade-contracts#325.
Changes
ring0.rs:internal_relayer_feefrom order's base token, setexternal_relayer_feeto zerointernal_relayer_feefrom bounded match result's token pair, use externally-provided rate forexternal_relayer_feeinternal_relayer_fee+external_relayer_feeparametersDependencies
Requires renegade-fi/renegade-contracts#325 to be merged first — the ABI crate dependency resolves via git.
Breaking Change
Coordinated deploy with contracts PR. Old Ring0 bundles signed with the single-fee digest format will fail on the new contract.
Ticket
renegade-map/tickets/add-per-party-relayer-fees-to-ring0-external-matches/