Shared Security
Secured by Polkadot’s relay chain validators.
SORA v2 operates as a parachain in the Polkadot ecosystem, enabling native cross-chain communication through XCM (Cross-Consensus Messaging). This integration provides shared security, interoperability with other parachains, and access to the broader Polkadot DeFi ecosystem.
Shared Security
Secured by Polkadot’s relay chain validators.
Native XCM
Direct messaging with other parachains.
Asset Transfers
Move tokens between Polkadot chains.
Remote Execution
Execute transactions on other chains.
┌───────────────────────────────────────────────────────┐│ Polkadot Relay Chain ││ (Shared Security) │└───────────┬───────────────┬───────────────┬───────────┘ │ │ │ ┌───────▼───────┐ ┌─────▼─────┐ ┌───────▼───────┐ │ SORA │ │ Acala │ │ Moonbeam │ │ Parachain │ │ Parachain │ │ Parachain │ │ │ │ │ │ │ │ ┌───────────┐ │ │ │ │ │ │ │ Polkaswap │ │ │ │ │ │ │ │ DEX │ │ │ │ │ │ │ └───────────┘ │ │ │ │ │ └───────────────┘ └───────────┘ └───────────────┘| Benefit | Description |
|---|---|
| Security | Validators shared with relay chain |
| Finality | Blocks finalized by relay chain |
| Interop | Native XCM with all parachains |
| Upgrades | Forkless runtime upgrades |
XCM is a messaging format that allows different consensus systems to communicate:
Move assets between chains:
Xcm(vec![ // Withdraw from origin WithdrawAsset(assets.clone()),
// Buy execution on destination BuyExecution { fees: fee_asset, weight_limit: Unlimited },
// Deposit to recipient DepositAsset { assets: Wild(All), beneficiary: destination_account, },])Execute logic on another chain:
Xcm(vec![ WithdrawAsset(fees.clone()), BuyExecution { fees, weight_limit: Unlimited },
// Execute call on remote chain Transact { origin_kind: OriginKind::SovereignAccount, require_weight_at_most: Weight::MAX, call: encoded_call.into(), },])Request information from another chain:
Xcm(vec![ // Query account balance on remote chain QueryHolding { query_id: 42, dest: destination, assets: Wild(All), max_response_weight: Weight::MAX, },])From another parachain to SORA:
// On source parachainlet xcm_message = Xcm(vec![ WithdrawAsset(MultiAssets::from(vec![ (GeneralIndex(asset_id), amount).into() ])), InitiateReserveWithdraw { assets: Wild(All), reserve: SORA_PARACHAIN_LOCATION, xcm: Xcm(vec![ BuyExecution { fees: (GeneralIndex(XOR_ID), fee).into(), weight_limit: Unlimited, }, DepositAsset { assets: Wild(All), beneficiary: sora_account, }, ]), },]);
pallet_xcm::send(origin, dest, xcm_message)?;From SORA to another parachain:
// On SORAlet xcm_message = Xcm(vec![ WithdrawAsset(MultiAssets::from(vec![ (GeneralIndex(ASSET_ID), amount).into() ])), InitiateTeleport { assets: Wild(All), dest: DESTINATION_PARACHAIN, xcm: Xcm(vec![ BuyExecution { fees, weight_limit: Unlimited }, DepositAsset { assets: Wild(All), beneficiary: recipient, }, ]), },]);| Chain | Direction | Assets |
|---|---|---|
| Polkadot Relay | Bidirectional | DOT |
| Acala | Bidirectional | ACA, aUSD, XOR |
| Moonbeam | Bidirectional | GLMR, XOR |
| Astar | Bidirectional | ASTR, XOR |
SORA maintains a registry of foreign assets:
// Query registered foreign assetslet foreign_assets = api.query.xcmPallet.foreignAssets.entries();
// Each asset maps to a MultiLocation// Example: DOT from relay chainMultiLocation { parents: 1, interior: Here,}Assets and accounts are identified by MultiLocation:
// SORA on PolkadotMultiLocation { parents: 0, interior: X1(Parachain(SORA_PARA_ID)),}
// XOR on SORAMultiLocation { parents: 0, interior: X2( Parachain(SORA_PARA_ID), GeneralKey(XOR_ASSET_ID), ),}
// Account on SORAMultiLocation { parents: 0, interior: X2( Parachain(SORA_PARA_ID), AccountId32 { network: None, id: account_bytes }, ),}XCM operations consume weight:
| Operation | Approximate Weight |
|---|---|
| WithdrawAsset | 1,000,000 |
| DepositAsset | 1,000,000 |
| BuyExecution | 500,000 |
| Transact | Variable |
Polkaswap can trade assets from any connected parachain:
Polkaswap aggregates liquidity across:
SORA v2 is a Substrate-based parachain on Polkadot.
SORA v3 transitions to Hyperledger Iroha 3:
| Aspect | v2 (Current) | v3 (Planned) |
|---|---|---|
| Framework | Substrate | Iroha 3 |
| XCM | Native | Via bridge |
| Polkadot | Parachain | Bridge connection |
Use local relay chain for testing:
# Start local Polkadot relayzombienet spawn config.toml
# Deploy SORA parachain./target/release/sora-parachain \ --collator \ --chain sora-localCommon XCM issues:
| Error | Cause | Solution |
|---|---|---|
TooExpensive | Insufficient fees | Increase BuyExecution amount |
AssetNotFound | Unregistered asset | Register asset first |
LocationNotFound | Wrong destination | Check MultiLocation format |
Barrier | Security filter | Verify allowed origins |
HASHI Bridge
TON Bridge
Polkaswap
XCM Docs