Skip to content

Update ERC-7786: Add requestRelay #981

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

frangio
Copy link
Contributor

@frangio frangio commented Mar 19, 2025

Questions:

  1. Should this functionality be in a contract separate from the gateway?
  2. Should we define a quoting/estimation mechanism for gas price?
  3. Should it be possible to pay with a different token?

@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Mar 19, 2025

✅ All reviewers have approved.

@cjcobb23
Copy link

  1. Should it be possible to pay with a different token?

I don't think this should be part of the standard. I think gas services will implement this, but it shouldn't be required.

@cjcobb23
Copy link

  1. Should we define a quoting/estimation mechanism for gas price?

I think so. I think more generally there should just be an estimate fee mechanism, that returns exactly what the user should pay to get the message delivered and executed. So it would also include any sort of fixed costs, in addition to the gas price.

@cjcobb23
Copy link

  1. Should this functionality be in a contract separate from the gateway?

I think the gateway should include these functions, so that way everything a user needs to send a cross chain message is encapsulated in one contract. But it should be possible for a separate contract to implement just the gas service part of the interface, so that way users can use a different gas service than whatever is tied to the gateway.

ERCS/erc-7786.md Outdated

Requests that the message identified by `outboxId` be delivered to the receiver (i.e., relayed).

Pre-pays via `msg.value` for the execution of the message on the receiver up to `gasLimit`. A `relayerFee` should be deducted from this to compensate the relayer.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if the destination chain has a different custom base token?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another open question for me. It could have to be paid directly in the destination chain gas token, but this may not be the UX we want. It may need to be swapped for the destination chain token, either at source or destination, though this sounds like it may leave the sender vulnerable to attacks if not designed correctly.

string[] calldata refundReceivers
) external returns (uint256);

function requestRelay(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a protocol where the sending & the relay requesting are not separated, what should this function do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, sendMessage would not actually interact with the protocol, the message would be stored until requestRelay is invoked. Alternatively, the requestRelay parameters are included as an attribute and it can all be done in one go.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like the sendMessage function would be quite the misnomer then 😄

Why separate the sendMessage & relay functionality in this standard at all? I know this closely follows the Axelar workflow so maybe @cjcobb23 can comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants