You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 withTokenError::BelowMinimum
via the following call flow:polkadot-sdk/polkadot/xcm/xcm-executor/src/lib.rs
Line 625 in ac3773e
polkadot-sdk/polkadot/xcm/xcm-builder/src/fungibles_adapter.rs
Line 390 in 3dece31
polkadot-sdk/polkadot/xcm/xcm-builder/src/fungibles_adapter.rs
Line 291 in 3dece31
polkadot-sdk/substrate/frame/support/src/traits/tokens/fungibles/regular.rs
Line 264 in bdbe982
polkadot-sdk/substrate/frame/support/src/traits/tokens/fungibles/regular.rs
Line 231 in bdbe982
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.The text was updated successfully, but these errors were encountered: