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

[xcm] Failing to deposit dust (below minimum value) will fail the whole XCM program #4408

Open
acatangiu opened this issue May 8, 2024 · 1 comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. T6-XCM This PR/Issue is related to XCM.

Comments

@acatangiu
Copy link
Contributor

Description

The implementation of DepositAsset will directly abort if any asset can't be deposited. This can happen if the amount of the asset is below its minimum balance and the receiver doesn't have a balance of it yet, in that case the asset transactor will directly fail with TokenError::BelowMinimum via the following call flow:

This is especially a problem for more complex XCMs that transfer multiple assets, which can completely fail when the leftover fee-asset amount (after paying the fees) is just dust and might not meet "min value" for depositing.

Proposed solution

Treat TokenError::BelowMinimum error as non-fatal in xcm-executor, effectively ignore errors of failures to deposit dust.

@acatangiu acatangiu added the T6-XCM This PR/Issue is related to XCM. label May 8, 2024
@acatangiu acatangiu moved this to High Priority in Bridges + XCM May 8, 2024
@acatangiu
Copy link
Contributor Author

Also related #901

@acatangiu acatangiu added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. T6-XCM This PR/Issue is related to XCM.
Projects
Status: Todo
Status: No status
Development

No branches or pull requests

1 participant