context: https://hackmd.io/@acatangiu/SkxHNEnYcJl
This document shall specify how the TEER token moves across parachains and consensus systems.
TEER-k and TEER-p are fungible accross the P<>K bridge such that we can teleport TEER between IK<>KAH<>PAH<>IP.
Advantages:
Disadvantages:
This seems not to be possible today.
TEER-p becomes the reference token and must be minted to full TEER supply. TEER-k becomes a (one-way redeemable) voucher for TEER-p which has to be available on IK (as bridged asset) to be swapped 1:1. TEER-k shall be burned in the process
Advantages:
Disadvantages:
If we can XCM-transact arbitrary calls from IK to IP (and preserve origin with XCMv5), we can implement a de-facto teleport ourselves:
We have other stuff users may want to move (e.g. TEERdays which are non-transferrable tokens)
One-way design example, assuming IK will be obsolete and people only move one-way. (it's possible to do this bidirectionally)
pallet_k_to_p (only on IK)
pallet_p_to_k (only on IP)
advantages:
notes:
// executes on IK with ROOT local origin (must be root to prove that funds have been burned on sender side)
// as Alice calls burn_and_move_account_to_p()
XCM(
// withdraw native asset for fees and pay for transport
WithdrawAsset(TEER-k),
PayFees(TEER-k),
// initiate a transfer to KAH including custom logic
InitiateTransfer(
// send to KAH
dest: KusamaAssetHub,
// teleport TEER-k as foreign asset on KAH,
remote_fee: Teleport(TEER-k),
// move no other assets beyond fee payment
assets: (),
// executes on PAH
remote_xcm: XCM(
// for fees
ExchangeAsset(TEER-k, KSM),
// initiate transfer to PAH including custom logic
InitiateTransfer(
// send to PAH
dest: PolkadotAssetHub,
// send KSM to pay remote fees (on PAH)
remote_fee: ReserveDeposit(KSM),
// include the other assets
assets: (),
// executes on PAH
remote_xcm: XCM(
// exchange KSM for some DOT for fees
ExchangeAsset(KSM, DOT),
// initiate transfer to IP including custom logic
InitiateTransfer(
// send DOT to pay remote fees (on IP)
remote_fee: ReserveDeposit(DOT),
// include any other assets
assets: (),
// executes on IP
remote_xcm: XCM(
// transact on IP as IK/root
Transact(mint_and_move_account_from_k(alice, balance)),
// refund any fees not spent
RefundSurplus,
// deposit all remaining assets to Alice IP
Deposit(All, Sovereign(IK))
)
)
)
)
)
)
)
In the case where we decide that IK should be deprecated in favor of IP, we can simply snapshot IK and apply it to IP (like we did from solochain to IK years back)
Why worry about lazy bridging if we can bridge all at once? (we still have sudo on IP)