Skip to content
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

Enhancing the current UA configuration #45

Open
lightning-li opened this issue Nov 30, 2023 · 1 comment
Open

Enhancing the current UA configuration #45

lightning-li opened this issue Nov 30, 2023 · 1 comment

Comments

@lightning-li
Copy link

lightning-li commented Nov 30, 2023

Description:

I've identified a potential improvement in the way cross-chain messages are managed between two chains, referred to as chainA and chainB, and their respective userApplication (ua) contracts, uaA on chainA and uaB on chainB.

Current Behavior:

When uaA sends a cross-chain message to uaB, it retrieves the relayer and oracle configuration for chainB from appConfig[uaA][chainB]. Let's assume the addresses are relayerA and oracleA. The fees for this operation are sent to relayerA and oracleA.
Upon execution of this cross-chain message on chainB, the system looks up appConfig[uaB][chainA] to confirm the configuration of relayerB and oracleB, ensuring the correct entities are relaying the message.
Similarly, when uaB initiates a cross-chain message to uaA:

It checks appConfig[uaB][chainA] for relayerB and oracleB's addresses, directing the fees to these addresses.
Upon execution on chainA, appConfig[uaA][chainB] is consulted to verify relayerA and oracleA's involvement.
Issue:
There seems to be an inconsistency. When uaA sends a message to uaB (chainA to chainB), relayerB and oracleB contribute to relaying and verifying the message, yet the fees are directed to relayerA and oracleA, and vice versa for messages from uaB to uaA.

Suggested Improvement:

To add flexibility and ensure the correct entities receive the fees for their services, I propose adding an extra key to the appConfig mapping: appConfig[sourceUa][destChainId][destUa]. This change should allow the system to directly associate fees with the relayers and oracles actually involved in a specific cross-chain transaction.

When uaA sends a cross-chain message to uaB, it retrieves the relayer and oracle configuration for chainB from appConfig[uaA][chainB][uaB] to get the addresses.
Upon execution of this cross-chain message on chainA, the system looks up appConfig[uaB][chainB][uaA] to get the relayer and oracle addresses.

Question:

Is my understanding correct that this proposed change would improve the fee distribution and overall flexibility of the cross-chain message handling?

@royalking14
Copy link

cross chain not fixed till fess also high slip page

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

No branches or pull requests

2 participants