When we first added XCM to our runtimes (first Altair and later Centrifuge), the first token we supported was Acala’s AUSD and for that we just added AUSD as a hardcoded variant of our CurrencyId enum type; That type enumerates all the currency ids that the Centrifuge chain knows about or is able to handle.
Later, improving our XCM setup, we introduced the ORML asset registry for two purposes:
so that we could support new tokens through XCM by simply registering them in the asset registry instead of hardcoding them in the CurrencyId type and thus not require runtime upgrades to support new tokens;
so that we had a standardised way of querying metadata for all tokens that Centrifuge handles, i.e, both native tokens like CFG and Tranche tokens, as well as “foreign” tokens like AUSD, USDC, etc.
This motion is now a step into cleaning up that first legacy, “hardcoding”-based approach; we do that by dropping those hardcoded currency variants (AUSD and KSM (the latter only applicable on Altair)) and have them registered as Currency::ForeignAsset(<asset_id>) in the asset registry instead; The next step will be to migrate all balances that are now under CurrencyId::AUSD and CurrencyId::KSM to CurrencyId::ForeignAsset(<aUSD_asset_id>) and CurrencyId::ForeignAsset(<ksm_asset_id>) , respectively.
Council Motion 86 passed in the council but was overwritten by Council Motion 87 (Runtime Upgrade 1026) so it never made it to a referendum.
This proposal has now been re-submitted as Council Motion 99 and if passed in the council, it will be fast-tracked and the voting time for the referendum will be 900 blocks (~3 hours).
There was in issue with the pre-image used to create Council Motion 99 (Referendum 22).
Status:
Register CurrencyId::Native (AIR)
Blank CurrencyId::AUSD (deprecated)
This worked apart from setting location to None; it just didn’t do anything
Register CurrencyId::ForeignAsset(2) (new AUSD id)
This failed because the location conflicted with the CurrencyId::AUSD entry
Register ForeignAsset(3) (KSM)
This never executed because the previous step in the batch failed; I set it as a batch and not batchAll to avoid a scenario like this but it still failed and stopped with utility.BatchInterrupted
Therefore, a new Motion has been submitted (Council Motion 100) with pre-image 0x618aabc5d8e98df5951701288881ef87544cd8821266aa2a9066c4f3455520c7
Set CurrencyId::AUSD ’s location to X2(OnlyChild, GeneralIndex(200081) This is an “invalid” multilocation. This structure was chosen because it’s quite symbolic, i.e, “relative to Altair, it’s a child (asset) left alone and with the index 200081 which is the original parachain id (2000) + the original asset general key (0x0081). Again, this means nothing really, but it’s a value that will serve the purpose of flagging this asset as abandoned and will allow us to register the new entry for AUSD with the correct multilocation.
Register CurrencyId::ForeignAsset(2) (new AUSD id)