Now that the Treasury has USDT and USDC, the Treasury logic (as in, the pallet you submit proposals to on the Relay Chain) needs to know how to assess the origin of the proposal to compare it against the Small, Medium, Big, &c. Spender tracks. It does this using the Asset Rate pallet.
This proposal creates three asset rates, one for DOT itself and two for USDT and USDC (each). The rate of DOT to DOT is 1, obviously. For USDT and USDC, I propose setting the rate to 10 USD(X). This is represented as 1000
in the proposal. Note that the rate does not affect the amount that gets paid out by a proposal, only the evaluation of the track permissions.
As an example, a submitter makes a proposal for 100 USDT. This would convert to 10 DOT, and the dispatch mechanism would ensure that the track (e.g. SmallSpender
) can spend up to 10 DOT.
Although this asset rate is set manually now, in the not-too-distant future we will be able to have the Asset Conversion pallet regularly report current ratios and have these rates update autonomously. This proposal is really meant to get us started and unlock USD(X) Treasury proposals.
A note on how to arrive at 1,000:
- 1 DOT = 10,000,000,000 units
- 1 USDX = 1,000,000 units (i.e. 6 decimals)
- 10,000,000 USDX units (10 USDX) = 10,000,000,000 DOT units (1 DOT)
- Drop a lot of zeros...
- == 1 / 1,000