interlay / interbtc

interBTC: Bitcoin Anywhere
https://app.interlay.io/
Apache License 2.0
246 stars 82 forks source link

XCM does withdraw without deposit #1131

Open gregdhill opened 1 year ago

gregdhill commented 1 year ago

Describe the bug The total issuance of the native tokens is slightly off, expected:

To Reproduce

  1. Call api.query.tokens.totalIssuance({ Token: "INTR" });
  2. Observe that the value is less than the initial distribution
  3. Check expected values here

Expected behavior The total issuance should stay the same.

Additional context From @sander2:

The culprit for this seems to be xcm: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fapi-kusama.interlay.io%2Fparachain#/explorer/query/3364108 It does a withdraw without a deposit

sander2 commented 1 year ago

This happens when a user is sending insufficient fees - the BuyExecution instruction fails and execution is aborted without depositing the already-withdrawn tokens. The same behavior is happening on Kusama as well, and I don't think we can easily do something about it. But let's say what parity says about the issue