This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
On sending back Statemine assets to Statemine through XCM #925
Labels
T6-XCM
This PR/Issue is related to XCM.
T7-system_parachains
This PR/Issue is related to System Parachains.
I have been thinking a lot on how to send statemine assets back to Statemine through xcm. I would like to discuss the inconvenients that I see when analizing possible solutions:
Problem statement:
Point number 3 implies that the sovereign account of the parachain that is transferring back the Statemine assets holds KSM. This can be achieved by:
3.1. Doing a reserve transfer asset of KSM from Statemine directly to the parachain.
3.2. Manually funding the sovereign account.
If we go for 3.1, I think we need to distinguish between KSM that came from Statemine and KSM that came from the Relay. Let's imagine that we have SovRelay and SovStatemine. If we map KSM coming from both chains to the same token in the parachain, a user could drain one of the sovereigns. For instance, say SovRelay contains 500 KSM. A user could transfer 500KSM from Statemine to the parachain (SovStatemine +500), and then withdraw SovRelay, leaving those who want to interact directly with the Relay without the possibility to do so.
So that leaves us with the necessity of having to map those two scenarios to different tokens in the parachain (or at least, record somehow how many KSM came from Statemine and how many from the Relay). The problem I am encountering is that I am not entirely sure how to do this with the existing code. I think I would need to distinguish based on the Origin (as the MultiLocation would be identical in both cases), but I dont see how FungiblesAdapter could do this
If we go for 3.2, users could simply withdraw enough KSM so that the balance of SovStatemine account goes below ED, eliminating its provider reference. This would prevent any other asset from being sent from Statemine to the parachain until someone funds again the Sovereign account.
Any thoughts on this? Any possibility of accepting XCM fee payment in any other asset that is not the Relay Token? Dont know if I missed anything, but if so please feel free to point it out
Thanks in advance
The text was updated successfully, but these errors were encountered: