Understanding Secured Assets
To understand how Rujira is the App Layer built on THORChain, please refer to the THORChain Docs, where the assets that tie the base layer (THORChain) together with the app layer (Rujira) are referred to as Secured Assets.
Secured Assets enable users to deposit Layer1 (L1) tokens (e.g., Bitcoin, Ethereum) into THORChain, minting corresponding tokens that can be used on Rujira and across the THORChain ecosystem. These assets offer fast, efficient trading and transfer options and are designed to integrate seamlessly with CosmWasm smart contracts and connect to other IBC-enabled chains.
Key Features of Secured Assets
Backed by L1 Deposits: Users deposit L1 tokens like BTC into THORChain's decentralized Asgard Vaults, which mints a corresponding Secured Asset (e.g.,
BTC-BTC
). These Secured Asset tokens represent a share of ownership of the underlying L1 assets in the vault. The Asgard Vaults are secured by Threshold Signature Schemes (TSS) with the private keys split among ~100 independent node operators that churn every 3 days.Fungible and Transferrable: Secured Assets are easily transferred between accounts or sent across IBC to other chains, enabling cross-chain trading and interoperability.
App Layer Use (Rujira): Within Rujira, Secured Assets can be used for trading, swapping, and interacting with decentralized apps (dApps) like limit orders, lending, or liquidity provision.
Efficient Arbitrage: Secured Assets allow traders (especially bots) to perform faster, more capital-efficient arbitrage compared to synthetics, adjusting market prices with less capital.
No wrapping or third-party bridges: Secured Assets remove all dependency to third-party bridges (e.g. Axellar, Gravity) and wrapping by centralized intermediaries (e.g. wBTC by BitGo, cbBTC by Coinbase), enabling access to DeFi with native assets from all connected chains.
Flow: Using Secured Assets on Rujira
How Secured Assets Work on Rujira
Deposit: Users deposit L1 tokens (e.g., BTC) into THORChain's decentralized Asgard Vaults, creating a corresponding Secured Asset.
Representation: The Secured Asset represents shares in the pool of deposited L1 tokens.
Trading and Swapping: On Rujira, users can trade or swap Secured Assets (e.g.,
BTC-BTC
) quickly and efficiently, without Layer1 fees.Smart Contracts: Secured Assets interact with dApps on Rujira via CosmWasm, enabling features like limit orders, lending, or liquidity provisioning.
Withdraw: When users want to convert back to L1 tokens, they can withdraw their Secured Assets for an equivalent amount of the original token (e.g., Bitcoin).
Security
Secured Assets are backed by L1 deposits but are separate from THORChain liquidity pools. To maintain security:
TVL Check upon minting ensures that there is sufficient security budget to accommodate more Secured Assets.
Incentive Pendulum ensures the total value of L1 assets (including Secured Assets) does not exceed the security provided by bonded nodes.
Automatic Liquidation can be triggered if L1 asset values exceed bonded security, diluting Secured Asset holders and redistributing liquidity to safeguard the network. Note: This feature is still being debated and hasn't been implemented yet.
Using Secured Assets in Rujira
Minting Secured Assets
To mint Secured Assets, users send L1 tokens with a specific memo to THORChain’s vault. The asset is then converted into a Secured Asset.
Example:
Swapping and Trading
On Rujira, Secured Assets can be swapped or traded like any other token, enabling quick and low-fee transactions.
Example:
Withdrawing Secured Assets
Users can convert their Secured Assets back into L1 tokens by sending a withdrawal memo, receiving the equivalent L1 token (e.g., Bitcoin) based on their Secured Asset balance.
Example:
Transaction Flow
To understand the the interactions between smart contracts on Rujira and the base layer L1 pools on THORChain, there are essentially two ways to call a contract:
Path 1: Layer 1 Transaction + Memo
Path 2: THORChain Transaction Direct Execution
Path 1: Layer 1 Transaction + Memo
A user initiates a transaction using a Layer 1 deposit along with a memo structured as x:{contract}:{payload}
. This triggers the smart contract on Rujira, executing the specified function while utilizing the funds sent in the Layer 1 transaction. The smart contract can then emit sub-messages to perform additional actions such as:
Swapping BTC to RUNE and bonding the RUNE with a Node Operator.
Depositing BTC into a lending protocol, borrowing secured USDC, and withdrawing secured USDC to say Ethereum or any other network supporting USDC.
The execution follows the sequence dictated by the contract logic, with each step being carried out in order. Once all actions are completed, the contract returns a response to the user.
Transaction flow using x:
Memo in Layer 1 Transactions
User: A
MsgDeposit
is initiated by the user with a memo formatted asx:{contract}:{payload}
.L1: The L1 performs a couple of actions when a user makes a deposit:
TxIn: The deposit is processed async without validation by the smart contract at this stage.
Mint Secured Asset: Mint x/bank token based on the user deposit
The contract is called when required, executing the necessary actions once prior steps are complete.
Path 2: THORChain Transaction Direct Execution
A user interacts with the contract directly via a THORChain transaction using MsgExecuteContract { contract, msg, funds }
. This method is functionally similar to the x:
memo approach but offers additional capabilities:
The
funds
field allows sending THORChain-native tokens such asx/ruji
, which do not have a representation inMsgDeposit
notation.The ability to send multiple tokens simultaneously, enabling operations like depositing
x/ruji
andETH-USDC
into a dual liquidity pool in a single transaction.
Transaction flow using direct MsgExecuteContract
Call
A user directly calls
MsgExecuteContract
on THORChain with{ contract, msg, funds }
.The contract processes the message and executes multiple actions such as an asset swaps, adding liquidity, etc.
The L1 Pools handle swap and liquidity actions.
TxOut
generates output upon LP token minting.The smart contract handles final steps such as staking LP tokens.
The contract then returns a response to the user.
Last updated