Skip to content

[L-05] Inflexible Fee Recipient Field Blocks Open Relaying #1021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: may-14-audit
Choose a base branch
from

Conversation

mrice32
Copy link
Contributor

@mrice32 mrice32 commented Jun 4, 2025

Currently, every DepositData and SwapAndDepositData payload must include a hard-coded fee recipient address, and upon successful deposit or swap-and-bridge the periphery pays submission fees to that exact address.

While this ensures the user knows in advance exactly who will receive their fee, it also prevents open relayer competition or fallback options when the chosen relayer is unavailable or underperforms.

Consider keeping the explicit fee recipient field option in SwapAndDepositData but introduce a "zero‐address" convention:

If the fee recipient is equal to the zero address, the periphery should default to using msg.sender as the payee.
Otherwise, transfer fees to the signed recipient as today.

Currently, every DepositData and SwapAndDepositData payload must include a hard-coded fee recipient address, and upon successful deposit or swap-and-bridge the periphery pays submission fees to that exact address.

While this ensures the user knows in advance exactly who will receive their fee, it also prevents open relayer competition or fallback options when the chosen relayer is unavailable or underperforms.

This change keeps the explicit fee recipient field option in SwapAndDepositData but introduces a "zero‐address" convention:

- If the fee recipient is equal to the zero address, the periphery defaults to using msg.sender as the payee
- Otherwise, transfer fees to the signed recipient as today

This enables open relayer competition while maintaining backward compatibility.
Signed-off-by: Matt Rice <[email protected]>
@mrice32 mrice32 requested a review from grasphoper June 4, 2025 05:14
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.

2 participants