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

Add multichain relayer limitations #1834

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/2.develop/relayers/gas-station.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,16 @@ Users who wish to get transactions signed and relayed by this contract and its a
- This transaction will return a signed payload, part of the sequence of transactions necessary to send the user's transaction to the foreign chain.
- Repeat `pending_transactions_count` times.
4. Relay each signed payload to the foreign chain RPC in the order they were requested.

## Limitations

When using the Multichain Gas relayer solution, some limitations should be consider. Here's a list of potential issues you might encounter, and suggested ways to mitigate them:
- Not enough gas for a cross-chain transaction to get included in time.
- **Solution:** overcharge for gas at the gas station and when constructing the transaction include more than the average gas price.
- Slippage violations causing the gas token or foreign chain Fungible Token to get refunded to the user's foreign chain address.
- **Solution:** encourage your users to use high slippage settings in volatile or low liquidity market conditions.
- **Solution:** if such error occurs, make the user aware of what happened and that funds were not lost.
- **Note:** in future versions the solution will support retrying transactions.
- Nonce issues if Paymaster rotation isn't done properly. This issue is a function of concurrent usage, blockchain finality time, and number of paymaster treasury accounts that the [Gas Station](gas-station.md) is rotating through.
- **Solution:** use a blockchain that has faster finality.
- **Solution:** increase the number of paymaster treasury accounts that the gas station rotates through.
13 changes: 13 additions & 0 deletions docs/2.develop/relayers/multichain-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ A paymaster represents an address on a destination chain that holds a balance of
Check the Relayer's [GitHub repository](https://github.com/near/multichain-relayer-server) to learn more about upcoming features and updates.
:::

## Limitations

When using the Multichain Gas relayer solution, some limitations should be consider. Here's a list of potential issues you might encounter, and suggested ways to mitigate them:
- Not enough gas for a cross-chain transaction to get included in time.
- **Solution:** overcharge for gas at the gas station and when constructing the transaction include more than the average gas price.
- Slippage violations causing the gas token or foreign chain Fungible Token to get refunded to the user's foreign chain address.
- **Solution:** encourage your users to use high slippage settings in volatile or low liquidity market conditions.
- **Solution:** if such error occurs, make the user aware of what happened and that funds were not lost.
- **Note:** in future versions the solution will support retrying transactions.
- Nonce issues if Paymaster rotation isn't done properly. This issue is a function of concurrent usage, blockchain finality time, and number of paymaster treasury accounts that the [Gas Station](gas-station.md) is rotating through.
- **Solution:** use a blockchain that has faster finality.
- **Solution:** increase the number of paymaster treasury accounts that the gas station rotates through.

## Total Time expectations for end users

It depends on the chain, but in our current estimation 50-90% of the time will be on NEAR calling and waiting for the signing to complete on the MPC service.
Expand Down
Loading