Skip to content

feat: update Ring0 bundle assembly for per-party relayer fees#1418

Open
sehyunc wants to merge 2 commits intomainfrom
codex/ring0-per-party-relayer-fees
Open

feat: update Ring0 bundle assembly for per-party relayer fees#1418
sehyunc wants to merge 2 commits intomainfrom
codex/ring0-per-party-relayer-fees

Conversation

@sehyunc
Copy link
Copy Markdown
Contributor

@sehyunc sehyunc commented Mar 26, 2026

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 match: derive internal_relayer_fee from order's base token, set external_relayer_fee to zero
    • External match: derive internal_relayer_fee from bounded match result's token pair, use externally-provided rate for external_relayer_fee
    • Both executor signature builders take internal_relayer_fee + external_relayer_fee parameters

Dependencies

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/

sehyunc and others added 2 commits March 25, 2026 16:22
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant