Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Kujira has successfully developed an innovative and cohesive DeFi ecosystem. However, recognizing past challenges, a newly announced partnership with THORChain marks an exciting new phase, offering significant potential for both platforms. See the official announcement about the Rujira Alliance:
While this collaboration will generate real-yield rewards for THORChain by distributing 50% of core Kujira dApps revenue to RUNE bonders and liquidity providers (LPs), it's important to consider what THORChain offers to Kujira, as well as the additional benefits Kujira brings to THORChain.
THORChain is a sovereign Layer-1 blockchain, distinct from most general-purpose platforms. Its design focuses on a specific set of groundbreaking functions, including:
Direct integration with native tokens from external chains
Cross-chain swaps
Liquidity provision
Savings and lending services
In essence, THORChain has solved the problem of native liquidity for cross-chain interoperability — a solution from which Kujira stands to gain substantially.
These functionalities are not deployed through smart contracts, but are embedded directly into the THORChain core. This is because THORChain does not support generic smart contracts like CosmWasm, which introduces certain limitations.
However, this also necessitates a more innovative approach to economic security. Unlike most DeFi platforms that use wrapped tokens (which can become worthless in case of an exploit), a breach of THORChain (e.g., draining native BTC or ETH) would still allow the attacker to profit from the stolen assets. To address this, THORChain employs rigorous security measures. Since 2021, THORSec, an always-on security detail, has safeguarded its operations, ensuring the highest levels of security for the ecosystem.
Given THORChain’s design, it makes sense to develop an application layer with CosmWasm functionality, especially with support from Kujira’s experienced development team.
For Kujira, migrating to become Rujira fills a critical gap. By building on THORChain, Kujira gains access to one of the most liquid, high-volume environments of native assets and cross-chain interoperability within decentralized finance. This combination will help Kujira resolve key pain points (visibility and liquidity bootstrapping) and realize its vision of delivering a state-of-the-art DeFi experience.
Rujira is the App Layer of THORChain, connecting its comprehensive ecosystem of DeFi applications with THORChain’s immense liquidity and cross-chain capabilities. This merger unlocks a powerful synergy, enabling projects to tap into THORChain’s liquidity, native token swaps, and interoperability while offering a seamless, user-friendly experience for DeFi users.
The standard revenue split between core applications and the Base Layer is 50/50. However, any economic activity that already contributes value to the Base Layer, such as applications built on top of the Rujira primitives, will not be required to pay for security twice.
will serve as the fee-switch token for the THORChain App Layer, enabling stakers to capture the revenue generated by applications that join the Rujira Alliance, after accounting for the portion shared with THORChain Base Layer to cover security costs.
Levana is excited to announce its partnership with the Rujira Alliance to build RUJI Perps, a new perpetuals (perps) trading platform alongside Kujira and THORChain.
RUJI Perps is a cornerstone of the Rujira Alliance, combining THORChain’s liquidity with the expertise of Kujira and Levana. The platform aims to offer trustless, Bitcoin-backed perpetual futures trading, enabling users to trade using Bitcoin as collateral.
The market for Bitcoin is substantially larger than the DeFi market, and RUJI Perps seeks to attract these users by providing a seamless experience rivaling centralized exchanges.
All protocol fees from RUJI Perps will be distributed as staking rewards, enhancing the value proposition for RUJI and RUNE stakers. Based on current DeFi market volumes, if RUJI Perps captures just 1% of the perpetuals market (about $60 million in daily volume), it could generate approximately $5.7 million annually for RUJI and RUNE stakers.
The synergy between THORChain’s native cross-chain liquidity and RUJI Perps' unique design will drive the growth of liquidity and trading volume, benefiting the entire Rujira ecosystem.
Levana’s LVN holders will have the option to swap their tokens for a share of the 5% of the RUJI supply allocated to Levana. All locked and vested LVN tokens will be unlocked in advance of the swap. This process will operate on a bonding curve over 12 months, with better conversion rates available early in the process.
Users who keep their RUJI in the merger contract for up to 12-month will benefit from increased conversion rates over time. Users can withdraw their RUJI at any time, but once withdrawn, they cannot deposit back into the merger contract, leading to more rewards for the ones who stay. Early participants who stay deposited in the merger contract for the full 12-month period will receive the most RUJI relative to the LVN swapped.
Rujira: Building the Omnichain DeFi rails for Humans and Machines
Welcome to Rujira, the powerful App Layer on THORChain with an integrated suite of DeFi tools and dapps, accessible with native assets from all connected chains. As an introduction, we would like to share some background on what we stand for, and what makes us unique.
We are committed, long-term builders: we survived the Terra crash in 2022, we survived the KUJI liquidation cascade in 2024, and we survived the THORFi blow up in 2025. No matter the challenge, we always find a way and keep building. This has allowed us to create one the most resilient and passionate communities in crypto ❤️
Overzealous regulators in the US, lacking vision and clarity, have created pockets of darkness in the industry enabling some operators to act like big casinos, allowing scammers to lurk. This is a far cry from a productive crypto sector supporting new financial instruments, democratization of assets’ ownership and enabling innovation in areas such as artificial intelligence.
The new US administration gives us a chance to build real products for real people, generating real value. With the hope that improved clarity on regulations will allow these DeFi products to be accessed outside of a pure crypto space.
Eventually, we hope to see the next generation of business owners using our launchpad to raise money to e.g. open a restaurant. Then launch a DAO to manage the board transparently and benefit from real time accounting and professional-grade reporting, at a fraction of the cost of running a traditional business. Crypto can only win if it moves beyond crypto.
Enter the Omniverse. A place where everything comes together, a unified ecosystem where all the different chains, wallets, and DeFi products converge into something bigger. We are not playing the short-term hype game. We are building the omnichain DeFi rails for humans and machines, with a sustainable economic model for the decades to come. All products across our comprehensive DeFi stack charge some protocol fees which are 100% distributed in USDC to RUJI stakers (net of the share of revenue going to THORChain Base Layer). Owning RUJI is owning a share of all economic activity happening on the App Layer.
From great challenges emerge incredible opportunities. Building the App Layer on top of THORChain’s technology gives us some unique edges:
We can tap into THORChain's deep liquidity, which fixes one of Kujira's biggest historical challenges: liquidity bootstrapping.
We can remove all dependency to third party bridges and wrapped tokens, enabling access to DeFi with native assets from all connected chains.
In particular, we can become the cornerstone of BitFra, providing access to DeFi with native BTC and capitalizing on the next wave of institutional and governmental BTC adoption.
Our apps are omnichain, accessible from all connected chains, all at once, and via any supported wallet.
Building the Rujira App Layer provides us with a unique opportunity in software development. We get to greenfield something we had already built and fix literally every issue we have seen over the years with Kujira. Truly satisfying.
No third-party bridges or wrapping by centralised intermediaries.
The only place where you can trade native BTC, but also native assets from all other connected chains, in an orderbook DEX; take a loan against native BTC; have a stablecoin backed by native BTC, etc.
Orderbook DEX, AMM, Perps, Money Market, BTC-backed stablecoin, Liquidations, Launchpad, NFT Marketplace, Options, AI Agents.
No need to navigate between different websites for each application.
New “Optimistic block commitment” tech that pre-compute the new chain's state, virtually giving a zero second block time and real time UI.
Provide a CEX-like experience, but 100% decentralized.
Accessible from a dedicated mobile app (Station).
Accessible from a ChatGPT-like AI interface.
Because we control the full stack, everything works together as a seamless ecosystem.
The AMM adds liquidity to the orderbook DEX.
The money market provides leverage for regular CDP loans and margin trading.
The liquidation engine protects all debt related products (loans, CDP stablecoins, margin trading).
The liquidity of THORChain Base Layer is virtualized via an AMM arbitrage strategy tapping into liquidity from the money market.
The liquidity in the orderbook backstops the liquidation bids via an AMM strategy.
Everything works together seamlessly within a coherent ecosystem.
As a user, connect your Bitcoin, Ethereum, Solana, Cosmos, etc. wallets and you will see your aggregated balances appear across all apps, and you will be able to trigger transactions from any connected chain, regardless of where your assets are.
As a builder, deploy once on Rujira and make your app available from all connected chains and wallets.
We will virtualize THORChain's Base Layer liquidity via an arbitrage market making strategy, allowing us to execute taker orders against TC ~$130m liquidity.
You can easily make your own estimates for spot trading revenue for volumes executed against the Base Layer as follow: Revenue = TC liquidity * Avg Daily Utilisation Ratio * 365 * 15 bps taker fee.
Historically, THORChain Average Daily Utilisation Ratio has been at ~0.49x and Kujira was at ~0.11x; most DEXs are typically in the 0.1-0.3x range.
For volumes executed against Base Layer liquidity, each $1 of volume on the App Layer = ~$1 of volume of the Base Layer, which generates fees for TC, which means 100% of the revenue on the App Layer side is sent to RUJI stakers.
We expect the growth in other products in the next few years - notably Perps, BTC-backed stablecoin and launchpad - will reduce the share of revenue coming from spot trading, reducing the reliance on Base Layer liquidity.
All products across our comprehensive DeFi stack charge some protocol fees which are 100% distributed in USDC to RUJI stakers (net of the share of revenue going to THORChain Base Layer).
RUJI token has no inflation, all the staking rewards are based on real revenue.
Owning RUJI is owning a share of all economic activity happening on the App Layer.
We will replicate the very successful TC affiliate fee model; allowing third parties to integrate with all the Rujira apps and monetize by charging a fee on top of protocol fees.
Aiming to integrate with SwapKit and all the major TC affiliates (TrustWallet, Ledger Live, Bitget wallet, etc.).
Before exploring the App Layer on THORChain, take the time to understand how Rujira and RUJI came about, how it works by building on top of THORChain by first reviewing:
If you are looking to build on Rujira (P.S. We Love You), then you can go straight to and the in the Developers section.
Rujira was born from a partnership between Kujira, Levana and THORChain, known as the Rujira Alliance. Kujira, Levana and three Kujira's ecosystem projects are being merged into Rujira, which becomes the App Layer on THORChain, unlocking powerful synergies:
THORChain provides deep liquidity, cross-chain capabilities and security for the App Layer.
Kujira + ecosystem projects and Levana provide a complete suite of DeFi products unified under a single brand and UX.
The unified THORChain App Layer will incorporate various teams including Kujira, three Kujira's ecosystem projects (Fuzion, Unstake, Gojira) and Levana.
These teams will form the backbone of Rujira, focusing on specific verticals within the DeFi ecosystem, ensuring that each product is built by experts.
Following the merger, the Rujira brand will become the official face of the THORChain App Layer, with the core team continuing to build out a world-class suite of DeFi tools. All current protocols on Kujira are encouraged to migrate to the new App Layer to benefit from THORChain’s liquidity and interoperability.
Kujira’s vision of providing sustainable, decentralized financial tools remains intact, but now enhanced with THORChain’s capabilities. This partnership creates new possibilities for DeFi innovation, offering developers and users a unique ecosystem for building and scaling financial applications.
The Rujira merger represents a pivotal moment for both Kujira and THORChain, bringing together the best of both worlds: Kujira’s innovative DeFi solutions and THORChain’s deep liquidity and cross-chain capabilities. Together, they are building a decentralized future where financial opportunities are accessible, inclusive, and powered by community-driven innovation.
In the following sections, we will explore the relationship between Rujira and each of those three parties, and how it all tie together into the RUJI tokens, accruing value from the economic activity happening on the App Layer. To get going, dive into:
RUJI Trade provides a decentralized, scalable, and highly efficient orderbook exchange (DEX) operating fully on-chain. The Orderbook DEX design offers low fees, a great trading UX, and a superior trade execution vs. standard AMM-DEXs.
Decentralized Orderbook Trading: A 100% on-chain orderbook exchange (including order matching logic), offering decentralized and permissionless trading.
Scalable Performance: Constant-time O(1) matching algorithms, allowing the DEX to handle very large transaction volumes efficiently.
Multi-source Liquidity: A unique architecture allows the Orderbook DEX to pull liquidity from multiple sources, including Rujira's AMM pools on the App Layer and THORChain's liquidity pools on the Base Layer via a dedicated market making arbitrage strategy that virtualizes the liquidity in the Base Layer pools.
Oracle Orders: A novel type of order allowing users to buy or sell at a fixed discount/premium to the underlying asset's oracle price, opening up the design space for innovative trading and market making strategies.
Margin Trading: The DEX connects directly into Rujira's Money Market to offer high leverage (up to [10x -TBD]) spot margin trading.
Low Fees: A cost-effective trading experience with low gas and low maker/taker fees (7.5bps/15bps).
OTC Platform: A separated product from the Orderbook DEX, RUJI Trade also provides an OTC platform, allowing projects and users to create public or private deals off the orderbook.
Rujira's orderbook model has several advantages over traditional AMM DEXs:
Better Trade Execution: Orderbooks offer better pricing and capital efficiency. As long as there are willing counterparties on the other side of a trade, traders can execute orders of any size without moving the price.
Modular Architecture Enabling Deeper Liquidity: Traditional AMM DEXs use a monolithic structure that distributes asset prices over a single bonding curve. The larger an order size relative to the size of the liquidity pool, the bigger the price impact suffered by the trader. In contrast, Rujira separates the DEX (orderbook) from the AMM (automated market maker), allowing it to pull liquidity from a variety of sources and market making strategies and combine them into a single orderbook, resulting in much deeper liquidity.
Intuitive Interface: Rujira’s DEX interface design is user-friendly and offers a smooth trading experience, comparable to centralized exchanges, with support for market orders, limit orders, and oracle orders which are unique to Rujira.
RUJI Trade charges a 0.075% fee on Maker orders (i.e. orders adding liquidity to the orderbook) and a 0.15% fee on Taker orders (i.e. orders removing liquidity from the orderbook).
In terms of fee sharing with THORChain Base Layer, a distinction must be made between the different fee types. The core logic regarding fee sharing is the following: For each transaction on the App Layer, is value accrued to the Base Layer?
If the answer is YES, there is no need to share revenue (the Base Layer already benefits).
If the answer is NO, then the 50/50 revenue split applies to pay for security.
RUJI Trade pulls liquidity from various sources. Depending on the source, the fee sharing rule applies differently:
For orders executed against App Layer liquidity, Rujira’s DEX collects both the 7.5bps Maker fee and the 15bps Taker fee. Trades executed against the App Layer liquidity do not accrue value to the Base Layer, therefore the 50% fee sharing with the Base Layer must apply to pay for security.
For orders executed against TC Base Layer liquidity, Rujira’s DEX only collects its 15bps Taker fee; the Maker in that case is the THORChain Base Layer pool, which charges its own fee (defined by mimir SecuredAssetSlipMinBps) and benefits from those additional volumes. Trades executed against Base Layer liquidity are systematically accruing value to the THORChain, therefore do not need to pay for security (i.e. RUJI stakers keep 100% of the Taker fee, but only the Taker fee is collected).
Token Seller pays a 1% commission on the tokens received from the buyer.
Token Buyer pays a 1% commission on the tokens received from the seller.
The standard 50/50 revenue share with TC Base Layer applies to all the fees collected by the OTC Platform.
RUJI is the new native token for the THORChain App Layer, born from the merger. Holders of existing tokens—KUJI, FUZN, NSTK, WINK, and LVN—can convert their tokens into RUJI. Staking RUJI allows users to earn fees generated across the App Layer, benefiting from THORChain’s high liquidity.
100M RUJI
At launch, there are no mechanisms for token inflation, and there are no plans to introduce any in the future.
RUJI will serve as the fee-switch token for the THORChain App Layer, enabling stakers to capture the revenue generated by applications that join the Rujira Alliance, after accounting for the portion shared with THORChain Base Layer to cover security costs. As outlined in the initial partnership announcement, the standard revenue split between core applications and the Base Layer is 50/50. However, any economic activity that already contributes value to the Base Layer, such as applications built on top of the Rujira primitives, will not be required to pay for security twice.
Kujira & Merged Ecosystem Apps (50%)
Levana (5%)
Ecosystem Fund (7.5%): To be used at the discretion of the Rujira team for additional mergers, liquidity mining, airdrops and other activities aimed at attracting users, builders and stimulating economic activity.
Builders Incentive Pool (7.5%): To be allocated as performance bonuses to apps, builders, and other contributors based on revenue contribution over four years, to ensure that the verticals that contribute the most value to RUJI are rewarded for it.
Operations (15%): To be used at the discretion of the Ruji team to fund operational expenses, Centralized Exchanges listings, provision Market Makers liquidity, and engage in value-added on-chain activities such as building up long-term protocol-own liquidity (e.g. to make market on the Rujira orderbook DEX via RUJI Pools).
New investors (15%): Targeting to raise at different rounds to capitalize the Operations treasury and the Ecosystem Fund. Any unsold tokens will be returned to the Operations treasury.
Holders of KUJI, FUZN, NSTK, WINK, and LVN tokens will have 12 months from the merger date to convert their tokens to RUJI. The conversion rate will start to decay after 4 weeks and will decrease linearly over the 12-month period, with early converters receiving the best rates. Key details:
Users can choose to keep their RUJI in the merger contract during the conversion period to earn additional rewards, as excess tokens will be distributed to those who delay withdrawal. Users can withdraw their RUJI at any time, but once withdrawn, they cannot deposit back into the merger contract, leading to more rewards for the ones who stay.
Starting from the merger date (expect. 27th February 2025), users will have 12 months to convert their tokens into RUJI. During the first 4 weeks, the conversion rate will be 1:1*, after which it will gradually decrease on a linear scale, reaching 1:0 by the end of the 12-month period.
The conversion rate applicable at the time a user initiates the conversion will be locked in and will not decline further, even if the user delays the withdrawal.
*Note: The conversion rate shown in the table above is considered 1:1 in instances where 1 merge token does not equate to 1 RUJI.
If not all tokens are converted, or if they are converted at less than a 1:1 ratio, there will be an accumulation of excess RUJI tokens. These excess tokens will be periodically distributed as rewards to users who choose not to withdraw their RUJI immediately.
The share of excess tokens a user earns will depend on when they initiate the conversion and how long they hold their RUJI before withdrawing. Rewards will continue to accrue until the user withdraws their tokens.
Users can withdraw both their converted and reward tokens at any time without any unbonding period, but they cannot redeposit to earn additional rewards. Partial withdrawal from the merger contract will be possible.
The Switch Handler on THORChain facilitates the migration of assets from external chains (e.g. Gaia) to THORChain’s native assets.
Originally, it enabled users to convert RUNE tokens from Binance Chain (BEP2) to native RUNE on THORChain. The process involved sending BEP2 RUNE to a designated address with a SWITCH memo, triggering the handler to mint an equivalent amount of native RUNE to the user’s THORChain address.
We have used this Switch Handler for all the Kujira and Levana tokens to migrate and become THORChain-native assets. These assets comprise two categories:
Tokens migrating and merging into $RUJI: $KUJI, $rKUJI, $FUZN, $NSTK, $WINK, $LVN
Tokens migrating but not merging: $NAMI, $AUTO, $LQDY (ex. $MNTA), $BOON
The process for switching above tokens to become THORChain-native assets:
Reinstating the Switch Handler: Removing the previous kill switch logic to allow new migrations.
Configuring On-Chain Parameters: Defining source assets, target denominations, and burn addresses in an on-chain configuration. For example for $KUJI:
source_asset: GAIA.KUJI-XXXXXXXXX
target_asset: kuji
burn_address: cosmos100000000000000000000000000000000708mjz
Executing the Switch: Users send their external assets to the THORChain GAIA.ATOM vaults, node operators validate the deposit and the network (a) mints a native token on THORChain and (b) sends the external asset on Gaia to the burn address.
Asset Purging: Transferred assets are sent to the designated burn address and removed from system accounting to prevent double-spending.
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.
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.
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).
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 can ensure the total value of L1 assets (including Secured Assets) does not exceed the security provided by bonded nodes. This feature is optional and controlled by a Mimir parameter 'PendulumUseVaultAssets'. By default, Secured Assets are "optimistically secured" by THORChain validators (they are not inside the Incentive Pendulum). Secured Assets make THORChain nodes money from App Layer fees, that is how they pay for their security.
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:
On Rujira, Secured Assets can be swapped or traded like any other token, enabling quick and low-fee transactions.
Example:
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:
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
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 as x:{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.
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 as x/ruji
, which do not have a representation in MsgDeposit
notation.
The ability to send multiple tokens simultaneously, enabling operations like depositing x/ruji
and ETH-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.
Every address on a Cosmos chain has an Account.
The Bank module accounts for ownership of tokens in a key-value store, where the key is the address<>denom, and the value is the balance.
CosmWasm has a 2 step process:
"Store" - Code is "stored with an integer Code ID.
"Instantiate" - A Code ID is instantiated and each instance gets its own address.
As it has an address, the bank module can now account for funds help by a contract.
When a CosmWasm contract is executed, at the end of execution, it can emit SubMsgs which are basically the same as the contract signing and broadcasting those Msg types itself.
Cosmos chains have discrete Msg types. The only two on THORChain that a user is allowed to use are MsgSend and MsgDeposit. You use MsgSend for sending RUNE, and MsgDeposit to "do things". Those things are encoded in the memo, e.g. swap RUNE for BTC, bond RUNE to a node operator.
There are a bunch of other message types which only active node operators can call, e.g. MsgObservedTxIn, MsgObservedTxOut and MsgMimir.
In fact, THORChain has non-standard Staking, Distribution and Gov Msgs. The only variants of CosmosMsg that are valid are BankMsg, Any and Wasm.
The Any msg variant is key here. A CosmWasm contract can only interact with THORChain via Any, and it's subject to all the same rules that an EOA is subject to.
MsgDeposit has a fixed 0.02 RUNE fee.
Smart Contracts are called with MsgExecuteContract, which can have a wide range of gas usage based on the logic of the contract.
All Msg types share the same mempool. In our integration, any Msg type that is signed by an Active Node gets priority in the mempool. CosmWasm tx types are second class citizens in order to ensure that the core protocol continues to operate uninterrupted.
The price that is charged for the gas that someone requests for their tx is set by node mimir. it defaults to 0, and is an economic Mimir to update it (2/3+ consensus required).
The App Layer only uses Secured Assets (which itself is a fork of Trade Assets, but transferable). Users deposit L1 assets and mint Secured Assets 1:1.
Secured Assets are "optimistically secured" by THORChain validators (they are not inside the Incentive Pendulum). Secured Assets make TC nodes money from App Layer fees, this is how they pay for their security.
Secure+ memo deposit on an observed chain will mint a bank module token 1:1.
MsgDeposit with secure- will withdraw those tokens back to the layer 1.
As bank tokens, Secured Assets can be utilised in the App Layer, swapped across the Base Layer to another asset, or redeemed back to L1. The UX feels like depositing into an exchange, "doing things" then withdrawing.
If there is a bug in the App Layer, nodes can pause the entire layer, or specific contracts:
HALTWASMGLOBAL - full shutdown of whole App Layer.
HALTWASMCS-{checksum} - halt all contract instances of a specific checksum (i.e. code version).
HALTWASMCONTRACT-{contract last6} - halt an individual contract.
Considerations: Halting a contract that depends on an oracle price that moves during halt could cause issues. Apps such as these should be designed to protect against sudden price movements in some way.
Checksum ⇒ deploy_address must be registered in the THORNode codebase in order to permit code storage. This means that wasm code can be inspected, audited, and a reproducible checksum emitted by any 3rd party that wants to verify the permission.
To understand how Rujira is the App Layer built on THORChain, please refer to the , where the assets that tie the base layer (THORChain) together with the app layer (Rujira) are referred to as Secured Assets.
When you install CosmWasm to a Cosmos chain, you can define "custom bindings", that you connect to Golang chain code for arbitrary execution (more info ). THORChain's CosmWasm does not have this.
The App Layer is designed with strict boundaries to ensure it does not introduce new risks to the Base Layer. Smart contracts on the App Layer are essentially “accounts with code” that are only permitted to perform MsgSend and MsgDeposit operations. They are sandboxed within a walled garden, with no special privileges that could compromise the Base Layer.
This setup ensures that the App Layer introduces no greater risk than a centralized entity holding a large amount of RUNE today. To further minimize risk, applications that might lead to significant RUNE accumulation will be avoided. Instead, the focus is on building apps centered around Secured Assets.
Additionally, THORChain’s governance mechanism (Mimirs) allows for fine-grained control: they can pause specific apps, all apps, or the minting/burning of Secured Assets if needed. Developers must go through a due diligence process to have their deployer address and smart contract bytecode whitelisted before deploying on Mainnet, adding another layer of security.
If there is a smart contract exploit on the App Layer leading to the misappropriation of secured assets, the loss is for each individual user that interacted with the malicious smart contract. This would obviously be a bad outcome, but it has no impact for the Base Layer, it’s just a change of ownership. The Base Layer would continue to neutrally process minting and redemptions of secured assets, as it is supposed to do, and would not assume any loss.
Note that Node Operators have the ability to pause smart contracts as shown above if such an issue was to happen and they wish to mitigate it.
A key concept around security is the separation of concerns between the Base Layer and App Layer. Smart contracts on the App Layer interact with the Base Layer the same way as any EOA, they can only do things that regular users can do.
What is the Mimir to stop minting/redeeming secured assets? HaltSecuredDeposit-{CHAIN} HaltSecuredWithdraw-{CHAIN}
What is the flow of redeeming secured assets and sending out the L1 outbound? Swap to an L1 address with the redemption memo.
How does secured asset accounting work? Is it held at App Layer or Base Layer? The accounting is held on the Base Layer. App Layer just gets to play with secured assets.
Can smart contracts mint secured assets? No. They can only use secured assets across the different contracts, but not mint (or burn) secured assets.
Are there TVL limits on the App Layer? Can secured asset balances grow larger than pools? This depends on the TVL Cap, which is an ongoing discussion in the THORChain community.
What happens if a protocol on the App Layer accrues bad debt? Bad debt would be assumed by the lenders in the Lending vaults. As long as the bad debt IOU is not in RUNE, then it has no impact for the Base Layer - we don't entertain releasing apps that will take excessive RUNE collateral.
What security measures are in place to prevent illicit actions in the mempool by MsgExecuteContract message? Messages are de-prioritised against all Base Layer messages so can't DoS MsgExecuteContract wraps MsgSend or MsgDeposit actions.
Will the Base Layer now need to consider each App Layer contract in its overall security posture? No - the Base Layer doesn't know that the App Layer exists, because apps can only do what EoAs can already do, and nothing extra.
Are there any risks App Layer products affecting Base Layer swap execution? No. All msgs are de-prioritised against Base Layer. Apps use the Base Layer to settle swaps.
RUJI Pools provides access to a multi-strategy Automated Market Maker (AMM) built to add liquidity to the Orderbook DEX. Market making keeps bid-ask spreads tight and deepens orderbook liquidity. It is essential to optimize trading conditions and provide a great trading UX. Rujira's AMM attracts liquidity providers (LPs) by offering yield in the form of trading profits.
Decentralized Market Making: Permissionless, 100% on-chain market making with no need for external cranking.
Virtualized orders: The protocol’s architecture enables the AMM to virtualize orders on the Orderbook DEX, meaning the AMM doesn’t need to move the funds to the DEX to place regular orders. It only needs to guarantee the DEX it can execute at the price it says it will, when a swap comes in on the DEX. We call this passive market making, as opposed to active market making which are strategies that places regular limit orders in the orderbook. RUJI Pools support both active and passive market making strategies.
High Capital Efficiency: As the funds are not required to be moved from the AMM to the DEX to market make, it means the AMM can market make on multiple markets simultaneously. This allows, for example, to have an AMM pool that provides liquidity in the BTC/USDC pair on the DEX with one strategy, and participate in liquidation of BTC collateral on the BTC/USDC money market with a different strategy.
Multi-strategy: Rujira's AMM is a flexible framework allowing deployment of all sorts of strategies which add liquidity to the orderbook DEX and, optionally, to other markets such as the liquidation of at-risk collateral in the money market. RUJI Pools comes with several in-house strategies, including:
XYK strategy: Uses a pricing and order sizing algorithm replicating the standard XYK logic used by a traditional AMM-DEX like Uniswap v2, but tailored for an orderbook DEX with some optimization to improve capital efficiency. This strategy suits smaller tokens still in price discovery mode and subject to high volatility.
Oracle-based Concentrated strategy: Deploys most of the liquidity around the current oracle price for a given pair, using Rujira's Oracle Orders functionality to provide deep liquidity and harvest volatility. This strategy suits established tokens with deep liquidity on other venues and reliable oracle prices.
Liquidation strategy: Takes the XYK pricing curve and places orders to bid on at-risk collateral using the liquidation engine. If the strategy bids at a fixed discount, e.g. 5%, and gets filled, it is guaranteed to receive a better price than the standard XYK. The difference between the standard XYK price and the actual execution price constitutes the liquidation profit. The AMM LPs retain the standard XYK profit and share 50/50 (TBC) the liquidation profit with RUJI stakers.
Unstake strategy: Provides liquidity to backstop Rujira's instant unstaking service. Rujira enables a highly efficient LST market (as an alternative to the standard TOKEN/TOKEN_LST concentrated LPs) by taking any supported LST as collateral, borrowing the underlying token on Rujira's Money Market and distributing the funds to the LST's seller. Under the hood, the protocol automatically handles the unstaking of the collateral, and uses the tokens received at the end of the unstaking period to repay the loan. The pricing given to the LST seller is a function of the expected money market interest rate + a margin. If, at the end of the unstaking period, the interest paid is less than expected interest + margin priced at the time of the unstaking, the profit goes to the LPs of the Unstake strategy; if the interest paid is higher than the amount provisioned, the shortfall results in a loss for the LPs. Over the long run, most unstakes are profitable for LPs, but some unstakes end up making a loss.
Strategies Layering: Rujira's Orderbook DEX allows the AMM to layer several strategies for any given pair in the orderbook, adding liquidity on top of liquidity from users' limit and oracle orders, and liquidity from the virtualization of TC Base Layer pools. This helps deepen liquidity vs. a traditional AMM-DEX and increases volumes on the DEX.
Third Party strategies: Rujira's AMM will enable third parties (e.g. experienced market makers, quants, and talented community members) to deploy their own strategies and get rewarded with a management fee and/or a performance fee. The design space for strategies is wide open: it could be other market making strategies, more opinionated strategies with a directional bias such as momentum strategies, or anything else. This will effectively create a market for systematic strategies, allowing talented quants to monetize their know-how while adding opportunities for Rujira's users and generating more trading fees for RUJI stakers.
LP Incentives: Optionally, the AMM allows third party protocols to incentivize liquidity by allocating token rewards to LPs, distributed over a custom period with a custom issuance curve.
Leveraged Market Making: The AMM connects directly into Rujira's Money Market, allowing liquidity providers to use their LP tokens as collateral to borrow any side of the LP and increase the size of their position. This allows for things like single-sided LP provisioning (e.g. provide BTC and borrow the USDC part to market make in the BTC/USDC pair, or the other way around if you have a bearish view on BTC vs. USDC) and partial hedging of LP positions. The position is profitable if the net trading profit on the LP position is higher than the interest paid on the debt.
Sustainable APR for LPs: An opportunity for Rujira users to generate sustainable returns on their crypto assets in the form of trading profits by providing liquidity. Users deposit in a given pool, and the AMM automatically places and adjusts orders in the Orderbook DEX based on the pool's specific strategy.
Multi-strategy Support: A flexible framework allowing the deployment of multiple strategies, catering for various risk profiles and bias towards market direction. Strategies can be developed by the Rujira team or third parties.
Enhanced Liquidity: The AMM brings the benefit of professional-grade market making on-chain to the Orderbook DEX, with enhanced liquidity and narrow spreads for a better trading experience.
Higher Trading Volume: Layering AMM strategies in the orderbook for a given pair leads to increased volume opportunities. The relationship between regular orders (at a fixed price) and oracle orders (at a fixed discount/premium to oracle price) is particularly beneficial to volumes. It creates a dynamic where oracle-based AMM strategies can trade against XYK strategies and other fixed-price orders, resulting in more volumes and profit opportunities for LPs, and more fees to RUJI stakers.
Economic Sustainability: Many top traditional AMM-DEX rely on unsustainable token incentives or inflationary rewards to generate attractive yield for LPs and attract liquidity. Uniswap rewards LPs with trading fees, but does not share any revenue with UNI token holders. Rujira’s Orderbook DEX model allows LPs in the AMM to generate sustainable returns from trading profits (e.g. by capturing the bid-ask spread defined by the strategy) without the need for any RUJI rewards. This mitigates the risk of continuous price pressure from LP incentives being farmed, alleviates the risk of liquidity disappearing once incentives run out, and allows trading fees (net of TC Base Layer share) to be 100% distributed to RUJI stakers.
Internalization of Market Making Revenue: This enables projects to turn what was historically a source of costs (market making by a paid professional) into a source of sustainable profit via protocol-owned liquidity. Rujira will demonstrate this by deploying a portion of its operational funds to market make for RUJI and other top tokens using Rujira's AMM pools.
Rujira's AMM is a tool built on top of Rujira's Orderbook DEX. It does not charge any additional fees. It complements the DEX to provide a better trading UX and more volume opportunities.
Every trade originating from an AMM strategy is subject to the standard Orderbook DEX fee, accruing value to both RUJI stakers and THORChain Base Layer.
Liquidity Providers on the AMM generate returns in the form of trading profits, not trading fees.
Strategies deployed by the Rujira team are not subject to any additional fees. However, strategies deployed by third-parties might be subject to performance and/or management fees.
What if there is an exploit and are all wiped? Any impact for the Base Layer? If an app gets hacked, it just means the hacker can withdraw the secured assets, not the original owners. It would take a Base Layer vulnerability to "mess with secured assets".
Why can swap against base-layer at 5-10bps rather than the mimir settings which results in 8bps at best and 31.9 bps at worst? The minimum swap rate for Secured Assets is defined by the mimir SecuredAssetSlipMinBps currently set at 5bps, same as Trade Assets (TradeAccountsSlipMinBps = 5bps). In practice, no user will be able to swap at those rates. To understand that, you need to understand how the App Layer is able to atomically tap into the Base Layer liquidity with its . The way this strategy works is that, for a given quantity of input token to swap, the AMM can estimate how many output token it would get if it was to execute a Base Layer swap, and then provide a quote for that quantity at Base Layer price + 2x SecuredAssetSlipMinBps + 15bps Taker Fee + 30bps Arbitrage Fee. You can think of the duo Arbitrage Fee + Taker Fee as an Affiliate Fee charged by traditional frontends, it’s economically the exact same thing for the end user, it’s just the mechanic for collecting those fees that is different.
What audits have been made on the integration of the App Layer? All apps deployed on Rujira have gone through rigorous internal testing and an external audit before release. You can find a collected overview of both contracts and audits in
Base Layer Arbitrage strategy: Virtualizes the liquidity in THORChain's Base Layer pools onto the App Layer, allowing the App Layer to tap into Base Layer liquidity while retaining transaction atomicity and composability. This single-sided passive market making strategy is able to query the Base Layer pools to see how many target asset (e.g. BTC) it would get for a given quantity of asset to be sold (e.g. USDC), and then provide a quote at a slightly worst price (Base Layer price + small margin). This quote appear in the orderbook alongside any pending limit and oracle orders. Whenever an order is matched against it, the target asset is borrowed from RUJI Lending for the duration of 1 block and used to fill the buyer's order on the App Layer, then the opposite swap is executed on the Base Layer at the end of the block. Finally, in the next block, the loan is repaid with the proceeds from the Base Layer swap, and the remaining profits, if any, are split 50/50 (TBC) between the LPs in the pool and RUJI stakers. Over the long run, most trades are profitable for LPs, but it might be instances where the execution price in the Base Layer pool is worst than what was quoted, in that case the strategy makes a loss that is funded by the LPs in the pool. For a deeper understanding of the strategy, see .
RUJI Options is a decentralized options exchange designed to simplify options trading to anyone in the crypto space. RUJI Options offers a straightforward and intuitive user experience, free from convoluted tokenomics or pricing mechanics.
Decentralized Orderbook: Options trading is facilitated via a decentralized orderbook that handles bids and asks for multiple strike prices within a given epoch.
Tokenized Options: When a user's order is filled, the protocol generates a unique token representation, known as an "option denom," based on a combination of parameters such as the contract address, underlying asset, option type, strike price, and expiration timeframe.
European-style Options: Options can only be exercised at expiration, providing greater flexibility and allowing investors to better manage their risk exposure without the need for early exercise or intervention.
Strike-Bound Liquidity: An innovative liquidity mechanism ensuring ample liquidity across various strike prices.
Discretized Black-Scholes Pricing: Options are priced using a discretized version of the industry standard Black-Scholes model, providing a transparent and well-understood pricing framework, optimized for liquidity concentration and transparency.
On-chain Historical Volatility: Historical volatility is calculated and stored on-chain, serving as a key input for option pricing.
On-chain Pricing Engine: Deployed fully on-chain for transparency and decentralization.
The mechanism leverages historical volatility data and confidence intervals to calculate strike prices, which are adjusted based on market conditions and risk tolerance. The calculation process involves the following steps:
Historical Data Capture: Captures periodic pricing data from an on-chain oracle.
Historical Volatility Calculation: Calculates the realized historical volatility over a specified time period.
Confidence Intervals Selection: Selects confidence intervals based on market conditions and risk tolerance, with the standard deviation serving as a proxy for risk.
Strike Price Calculation: Combines historical volatility and confidence intervals to calculate strike prices, using a standard normal distribution to generate a probabilistic range of potential strikes.
This process ensures accurate and responsive strike prices, reflecting actual market conditions.
Democratizes Access to Options: Offers a censorship-resistant and transparent alternative to traditional centralized options markets, empowering users with unparalleled control and accessibility.
Fully Decentralized: Enhances transparency (pricing and trading happen 100% on-chain) and reduces counterparty risk while ensuring users retain full custody of their assets throughout the trading process.
Efficiency: Automatic strike prices selection reduces the need for manual orderbook management for liquidity providers, optimizing liquidity concentration and enhancing the trading experience.
Composability: The use of unique "option denoms" standardizes the representation of options positions, enabling seamless integration with other protocols, and fostering the creation of new financial products.
Reselling into the Orderbook: Users can resell their tokenized options back into the orderbook of the RUJI Options market. This innovative capability allows users to easily close their positions or take profits/losses without the need to find a counterparty outside the market, further enhancing the trading experience.
RUJI Options charges a 1.0% settlement fee on trading volumes.
The standard 50/50 revenue share with TC Base Layer applies to all the fees collected by RUJI Options.
RUJI Ventures is where capital connects with ideas and everyone is a venture capitalist.
Users gain early access to promising protocols and opportunities to benefit from their favorite projects that raise capital for expansion and development.
RUJI Ventures differs from typical launchpads by providing a comprehensive suite of tools for projects at all stages, from bootstrapping to token generation events (TGE) and late-stage fundraising.
Flexible Raising Options: Choose a fundraising mechanism suited to your needs and strategy from a range of options including fixed price first-come-first-served sales (whitelist optional), fair market auctions and bonded token offers.
Multi-chain Access: Support for tokens minted on various blockchains, with seamless bridging for cross-chain sales or purchases.
Permission-less Self Service: Launch a sale without restrictions, with self-service tools and technical support available.
Automated Ecosystem Integration: Effortlessly create trading pairs, provide liquidity, and manage tokenomics, complete with vesting schedules and cliffs.
Easy Token Management: Set out tokenomics and automate distribution as part of the process.
For Buyers: Back the next unicorn with ease using a streamlined user experience and a marketplace designed to simplify investment discovery and manage your purchases seamlessly.
For Sellers: RUJI Ventures user interface enables project teams to create sales, mint tokens, establish trading pairs, and provide liquidity all in one place. An effortless fundraising process enables builders to focus on what they do best: building.
Mint Anywhere, Raise on Rujira: It’s easy to bridge over and raise capital, whichever chain you call home.
Raise, Mint, Distribute in One Place: Our tools help you speed up. Streamline your capital raising, minting, and distribution processes and stay focused on development.
Repeat Capitalisation: Raise the funds you need, when you need it. Project requirements change and we have tools for every stage of your development.
FCFS and Auction (initial token offerings):
Token seller pays a commission of 5% on the proceeds from a sale.
Buyers pay a 0.5% commission on the withdrawal of tokens purchased.
Sellers pay a 0.5% commission on claim of LP tokens created during a sale.
Bonds (follow-on offerings):
Token seller pays a commission of 0.5% on the proceeds from a sale.
bTOKEN holders pay a 0.35% commission on the redemption of tokens after the bond reaches maturity.
The standard 50/50 revenue share with TC Base Layer applies to all the fees collected by RUJI Ventures.
RUJI Lending is a decentralized money market connecting lenders and borrowers of crypto assets. It enables lenders to earn interest on their tokens, and borrowers to secure loans against their crypto collateral.
Lending: Generate passive returns by lending out your tokens, with a fairly low risk profile (all loans are overcollateralized). Lenders supply assets in exchange for a receipt token (xTOKEN), which accrues interest over time. The xTOKEN is transferable and can be used in other dApps, or redeemed back for the original asset plus accrued interest. Deposits can be withdrawn at any time, as long as asset utilization remains under 100%.
Borrowing: Unlock liquidity in the form of overcollateralized loans, without selling your crypto assets. Borrowing is permissionless; no credit checks or lengthy applications required. No minimum or maximum loan duration, you can partially repay or fully close your position at any time.
Overcollateralized: All loans are overcollateralized, meaning that at a maximum (illustrative) 75% Loan-To-Value ratio (LTV), there is always >$1 of collateral backing each $0.75 worth of debt.
Isolated Markets: Each collateral_token/debt_token pair corresponds to a separate lending market, with its own risk parameters. Maximum LTV and borrowing cap are set market-by-market, based on available on-chain liquidity ensuring that, in case of a sudden and material drop in price, there should be enough liquidity to facilitate orderly liquidations. This allows for a more granular control of risk and reduces the risk of bad debt propagating into the system.
Variable Interest Rate: Borrowers are charged variable interest rates based on the utilization rate, which is a function of supply and demand for a given asset (utilization = total_borrowed / total_supplied). The interest rate curve (available in the UI for each market) typically starts at 2% borrowing APR when utilization rate is 0%, and increases linearly toward 8% APR when utilization rate reaches 80%. Beyond that point, the borrowing APR increases sharply towards 300% when utilization rate reaches 100%. This dynamic incentivizes new suppliers when markets are hot and encourages borrowers to unwind their positions.
Liquidations Powered by Rujira Engine: If a debt position exceeds its safe LTV limit (either because of the value of the collateral dropping, or the value of the debt increasing due to interests), a portion of the collateral becomes available for liquidation to bring the position back to a safe level. The at-risk collateral can be acquired at a discount to market value via Rujira's Liquidation Engine, using a Dutch auction to determine the discount.
Low-Risk Return: Earn interest on your crypto assets by lending them out with a fairly low repayment risk (overcollateralized loans) and no exposure to Impermanent Loss (single-sided deposit, as opposed to deposits in the AMM pools which comprise two assets and are subject to IL risk).
Permissionless Borrowing: Easily take a loan against your crypto assets, whether it is to speculate on the markets, or to pay for real-life expenses.
Native Assets Support: Earn interest or borrow against all native assets connected to THORChain (including BTC, ETH, BCH, DOGE, etc.), no need for bridged or wrapped version. Main Cosmos assets are also supported.
Fair Liquidations: In case of adverse price movements for borrowers, liquidations are handled by Rujira's Liquidation Engine which allows everyone to bid on at-risk collateral via a Dutch auction mechanism. This creates a competitive market for liquidations, which tend to result in lower liquidation penalties for borrowers vs. traditional money markets where the liquidation discount is fixed.
Efficient Integration: Fully integrated into Rujira's product suite, RUJI Lending enables leverage features in core apps such as spot margin trading on RUJI Trade and leveraged market making on RUJI Pools. This leads to increased borrowing volumes, increased liquidity on the orderbook DEX, higher spot trading volumes and more liquidation opportunities.
Intuitive UX: Simplifies the process of lending and borrowing assets.
Borrowers are charged an interest rate (borrowing APR) which is updated each block based on the utilization rate of the borrowed asset compared to the total supplied for lending.
90% of the interest charged goes to lenders and 10% is kept as protocol revenue, which is shared 50/50 with THORChain Base Layer.
RUJI Liquidations is the world’s first public marketplace for bidding on at-risk collateral, enabling users to liquidate assets across the THORChain App Layer with ease - no bots, no code. By participating in a Dutch auction, users can acquire liquidated collateral at up to a 30% discount while protecting the solvency of Rujira protocols.
Liquidations Marketplace: A public marketplace for purchasing liquidated collateral at a discount through Dutch auctions with a user-friendly interface and instant settlement.
Queue-Based System: Liquidations are not prioritized by speed but rather by the discount rate, filling bids from the smallest discount to the biggest. This helps to find an optimal discount rate and prevents immediate selling and damage to the market by MEV bot operators.
Anti-Bot Approach: To prevent front-running by bots, there is a 10-minute activation delay between the moment a bid is placed and the moment it can be activated. If there are not enough bids in the queue relative to the amount of at-risk collateral to be liquidated, the activation delay is voided, allowing arbitrage bots to preserve the system solvency.
Ecosystem Solvency: Secure the Rujira ecosystem solvency for all leveraged products, including loans on RUJI Lending, and debt used for spot margin trading and leveraged market making.
Yield Bearing Token support: For better capital efficiency, users can bid on liquidations using yield bearing tokens (tokens deposited on Lending), earning yield while waiting for bids to fill.
Analytics: Basic liquidation analytics are available across all RUJI Liquidations markets, with more advanced analytics planned.
Third Party Integration: RUJI Liquidations can be integrated into third party money markets and other leveraged dApps for both EVM and RUST-based projects. If you are interested in providing your community with fair access to liquidations while reducing the cost of being liquidated for your users, reach out to the Rujira team.
Mitigate Flaws in Standard Liquidation Mechanisms: The typical liquidation mechanism for DeFi protocols functions on a first-come-first-served basis and at a fixed liquidation discount. Consequently, liquidations are based on the speed of execution, leaving this market to a few highly efficient, well-capitalized MEV bots that preclude most users from participating. The fixed discount also results in liquidations often costing more to liquidated borrowers than they would in an efficient market. RUJI Liquidations changes this.
Democratizes Access to Liquidations: The RUJI Liquidations queue revolutionizes DeFi liquidations by allowing anyone to bid on discounted collateral. Users place bids and bids at smaller discounts take priority, creating a fair system that discourages arbitrage and market dumping.
Reduces Cost of Liquidation for Borrowers: RUJI Liquidations creates a competitive market for liquidations and encourages bidders to reduce their bid discount in order to increase their chances of capturing the at-risk collateral, which results in a less costly liquidation process for borrowers. RUJI Liquidations (f.k.a. ORCA) had a TVL of $200m+ at its peak, prior to Terra Classic's collapse, that was being used to liquidate collateral on Anchor protocol with most of the liquidations happening within the 2-5% range.
Buy Assets at the Local Bottom: RUJI Liquidations effectively enables users to buy local bottoms and sell local tops in their favorite assets. Even at a 0% discount, it’s a compelling opportunity.
Reduces Market Volatility to the Downside: Most liquidation bots are arbitrage bots, they buy discounted liquidated collateral and sell it at market price within the same block, pocketing the liquidation discount in a risk-free transaction. This behavior leads to liquidation cascades, a feedback loop where selling pressure from the bots pushes prices further down, triggering more liquidations, which causes more sell pressure, and so on. RUJI Liquidations mitigates this immediate selling and damage to the market by MEV bots.
RUJI Liquidations charges two type of fees:
Liquidation fee: 1.0% taken on the repaid debt.
Withdrawal fee: 0.5% taken on the liquidated collateral.
The standard 50/50 revenue share with TC Base Layer applies to all the fees collected by RUJI Liquidations.
Question: What is Rujira? Answer: Rujira is the App Layer built on top of THORChain, offering a complete suite of DeFi apps, accessible with native assets from all connected chains. Rujira core products include an Orderbook DEX, an Automated Market Maker, a Perpetual Futures DEX, a Money Market, a Liquidations Marketplace, a Launchpad, a NFT marketplace and more. All Rujira’s products are available from a unified web interface covering all your DeFi needs in one place. Rujira will also be accessible from a dedicated mobile app (Station) and a chat-GPT like interface (RUJI AI). Question: Is the App Layer a L2 on top of THORChain? Answer: No, a L2 would suggest a different mempool/consensus mechanism, using the L1 as a settlement layer. The App Layer shares the same consensus mechanism as THORChain, it has the same blocktime and supports atomic transactions between CosmWasm contracts and THORChain L1. We refer to THORChain as the Base Layer and Rujira as the App Layer.
Question: What does Omnichain mean? Answer: Ominichain refers to the fact that Rujira apps are accessible from all connected chains, all at once, and via any supported wallet. As a user, it means you can connect your Bitcoin, Ethereum, Solana, Cosmos, etc. wallets and you will see your aggregated balances appear across all apps, and you will be able to trigger transactions from any connected chain, regardless of where your assets are. As a builder, it means you can deploy once on Rujira and make your app available from all connected chains and wallets. Question: What is the Omniverse? Answer: With the Omniverse we refer to Rujira and what we are building: a place where everything comes together, a unified ecosystem where all the different chains, wallets, and DeFi products converge into something bigger. Question: Is Rujira connected to other Cosmos chains via the IBC? Answer: No, Rujira does not utilize the Inter-Blockchain Communication (IBC) protocol for cross-chain interoperability. Instead, Rujira leverages THORChain technology and secured assets to operate as the omnichain DeFi hub. At this stage IBC is disabled and might never be enabled like on other Cosmos chains. A custom implementation to connect with the rest of the Cosmos is being researched by the Strange Love team, but specifications are not finalized yet.
Question: What it the main value propositions of RUJI? Answer: RUJI represents a bet on the success of the Rujira. RUJI accrue value from the revenue generated by Rujira's core applications, therefore increasing adoption and usage should lead to an appreciation in RUJI's value and/or a higher staking yields. A bet on RUJI is essentially a bet on the growth of the economic activity on the THORChain App Layer. Question: Where does RUJI staking yield come from? Is the token inflationary? Answer: RUJI is a non-inflationary token. Rujira dApps generate real revenue from users' economic activity. Fees paid on these dApps (net of THORChain Base Layer share) are converted to USDC and distributed to RUJI stakers. Question: How are the fees distributed between the App Layer and the Base Layer? Answer: The standard revenue split between core Rujira applications and the Base Layer is 50/50. However, any economic activities that already contribute value to the Base Layer, such as swaps executed against Base Layer liquidity, and applications built on top of the Rujira primitives, are not required to pay for security twice and can keep 100% of their revenue. Question: What staking options are available? Answer: There will be two options available to stakers:
Single-sided staking with RUJI token.
LP staking with a RUJI/RUNE LP token.
Question: What will the staking APY be? Answer: The staking APY will be dynamic and dependant on multiple factors:
The revenue split between the single-sided RUJI staking and the LP staking with the RUJI/RUNE LP token (set to 50/50 initially).
The total amount of RUJI staked and the distribution between single-sided stakers and LP stakers.
The amount of revenue collected from the Rujira products.
Question: How Secured Assets differ from traditional Bridged Assets? Answer: Bridged assets are IOUs issued by a third-party protocol on the destination chain, and represent a claim on the underlying asset on its native chain. In the best case, the assets on the native chains are secured by an external validator set (e.g. Axellar, Gravity), and in many cases by low-security multisig that have resulted in billions of dollar lost in hacks (Ronin Bridge $625m hack, Wormhole Bridge $326m hack, Nomad Bridge $190m hack, and the list goes on). In any case, they introduce an extra layer of exogenous risk between the native chain and the end user. Secured Assets, on the other hand, eliminate this additional layer of risk. While they do indeed mint new assets on THORChain, THORChain’s TSS eliminates the external risks associated with third-party bridges and their security designs. This provides a far more robust architecture for Secured Assets than traditional bridges.
Question: How Secured Assets differ from Wrapped Assets? Answer: Wrapped assets are also IOUs, but, unlike bridged assets, these are issued by a centralized intermediary, one that holds the underlying asset in custody (e.g., wBTC issued by BitGo or cbBTC issued by Coinbase). This allows assets like BTC to be used in DeFi on e.g. Ethereum, but it forces users to trust the centralized issuer to secure the underlying assets appropriately, to not misuses the reserves, and to not give in to censorship (e.g. freezing assets under the pressure of arbitrary governments). In using wrapped assets, a centralized intermediary have now become one’s unintended financial partners, negating the very ethos of decentralization. In contrast, Secured Assets require no error-prone and corruptible centralized custodian, and are never subject to permission or KYC requirements.
Question: I can't find my order on RUJI Trade even though it should have gone through. Did I lose my money? Answer: After orders execute on RUJI Trade orderbook DEX, you must claim them before seeing the new tokens in your wallet. Navigate to the "Claim" tab for any token pair you transacted with and check for any open completed orders to claim.
Welcome to Rujira, the THORChain App Layer designed for building secure and sustainable decentralized applications (dApps) and smart contracts. This section will help you understand the core concepts you'll need to get started building on Rujira.
Before getting started building on Rujira, make sure to familiarize yourself with:
Besides above, Rujira is made up of multiple moving parts making up the entire App Layer
Rujira.js: A JavaScript SDK tailored for TypeScript-based backend interaction between applications and smart contracts on Rujira.
Rujira-rs: A Rust library that contains the essential message types and structures for interacting with Rujira's core app-layer smart contracts. This SDK simplifies integration between core smart contracts and any dApps built on top of them.
Rujira.ui: A collection of reusable UI components that also provide wallet integration, enabling quick and easy development of dApps with consistent user experiences.
While migrating from Kujira to Rujira, it's useful to reference a few essential developer resources:
Furthermore you may also be interested in the following specific Github sections:
This guide will walk you through the development process for building, testing, and deploying CosmWasm contracts on Rujira. It covers everything from writing your contract, performing unit and integration testing, deploying to test environments, and finally deploying to mainnet.
Rujira contracts are built using CosmWasm, a smart contract platform written in Rust. Follow the steps below to get started writing your contract:
Contract Structure: CosmWasm contracts typically consist of the following components:
InstantiateMsg: Defines the parameters required to initialize the contract.
ExecuteMsg: Represents various actions that users can invoke on the contract.
QueryMsg: Represents read-only operations that fetch contract state.
Serialization: Contracts in CosmWasm use #[cw_serde]
for serialization and deserialization. Rujira may introduce a modified implementation of #[cw_serde]
to provide a more compact encoding of ExecuteMsg
s, especially since these messages may be inserted into Layer 1 memos for CosmWasm callbacks. This will ensure efficient handling and smaller payloads.
Best Practices:
Organize your code into modular functions for better readability and maintenance.
Use meaningful types and clear names for your messages and state variables.
Ensure that your contract handles errors gracefully and follows security best practices to prevent issues like reentrancy.
Before deploying your contract, it’s crucial to write and execute tests. CosmWasm provides a robust testing framework within Rust to simulate contract behavior and ensure correctness.
Unit tests validate individual functions within your contract. Use these tests to check that your logic is working as expected for different scenarios, without the need for a full blockchain simulation.
Write unit tests: Add your test functions within the tests
module in your contract.
Test execution: Run your tests using the command:
Set up multitest: Include the cw-multi-test
package in your Cargo.toml
dependencies.
Simulate complex scenarios: Write tests that involve message execution, querying, and contract-to-contract interactions.
Run multitest: Execute your multitest suite using:
Multitest provides a highly realistic environment, simulating actual blockchain behavior without the need for a full node or deployment to a testnet.
After validating your contract through unit and integration tests, the next step is deploying it to a test environment. Rujira offers several options for deploying your contract for further testing.
Mocknet and Stagenet:
Mocknet: A permissioned environment may be provided for quick mock deployments. This will allow fast iteration during the development process.
Stagenet: If Stagenet is permissioned, you'll need appropriate permissions for deployment. This will closely resemble the mainnet environment.
Rujira's UI will provide a convenient interface for uploading contracts, instantiating them, and managing contract states, making it easy for developers to test their contracts in a familiar setting.
Compile your contract to WASM:
Use the Kujira Developer UI or command-line tools to upload and instantiate your contract.
Once your contract has been thoroughly tested, it’s time to deploy it to the Rujira mainnet. This process involves additional security checks and permissions to ensure the integrity of the contract on the network.
For mainnet (and possibly Stagenet), Rujira will maintain an on-chain registry that maps each contract’s checksum to its deployer. This registry will grant permissions for instantiation based on the contract’s checksum rather than its code ID.
The process will involve:
Registry check: The registry will verify that the deployer is allowed to instantiate a specific contract version, using the contract’s computed checksum.
MsgStoreCore: If the checksum matches the registry entry, the deployer will be granted permission to store the contract on-chain.
MsgInstantiateContract: Once the contract is stored, the deployer can instantiate it with the appropriate parameters.
By tying instantiation permissions to the contract checksum, Rujira ensures that only approved contract versions can be deployed on mainnet, improving security and reliability.
Ensure your contract checksum matches the registry.
Submit MsgStoreCore with the correct checksum to store your contract.
Use MsgInstantiateContract to deploy your contract instance on mainnet.
The Rujira development process offers a streamlined workflow for writing, testing, and deploying CosmWasm contracts. By following the steps outlined above, you’ll ensure your contract is robust and ready for deployment on Rujira’s mainnet. Be sure to make use of the tools provided, such as the Kujira Developer UI, to simplify your deployment tasks.
The Base Layer Arbitrage strategy is a single-sided passive market making strategy that allows Rujira App Layer to virtualize the liquidity in THORChain's Base Layer pools.
On the Base Layer, all swaps are executed at the end of block and ranked by price impact. This means that despite the App Layer sharing the same blocktime and - in theory - supporting atomic transactions between CosmWasm contracts and THORChain Base Layer, in practice we cannot have atomicity with the Base Layer swaps, i.e. we cannot within the same block do something on the App Layer, then do a Base Layer swap, then do something else on the App Layer with the proceeds from that swap. The Base Layer Arbitrage strategy is Rujira's answer to this problem, it allows the App Layer to tap into Base Layer liquidity while retaining transaction atomicity and composability.
Whenever someone want to do a swap on the App Layer (e.g. I want to swap 10,000 USDC for BTC), the market making strategy is able to query the Base Layer pools to see how many BTC it would get for 10,000 USDC and then provide a quote at a slightly worst price (Base Layer price + small margin). This quote appear in the orderbook alongside any pending limit orders and oracle orders. Whenever an order is matched against it, the target asset is borrowed from RUJI Lending for the duration of 1 block and used to fill the buyer's order on the App Layer, then the opposite swap is executed on the Base Layer at the end of the block. Finally, in the next block, the loan is repaid with the proceeds from the Base Layer swap, and the remaining profits, if any, are split 50/50 (TBC) between the LPs in the pool and RUJI stakers. Over the long run, most trades are profitable for LPs, but it might be instances where the execution price in the Base Layer pool is worst than what was quoted, in that case the strategy makes a loss that is funded by the LPs in the pool.
Rujira is an open-source software project, licensed under the MIT License. This license allows developers to freely use, modify, and distribute the software while providing certain protections to the authors and contributors.
Below are the details of the license and how it applies to the Rujira project.
The Rujira project is licensed under the MIT License, a permissive open-source license. Here's what the MIT License allows:
Free Usage: You can use Rujira for any purpose, whether personal, academic, or commercial.
Modification: You're free to modify the source code to fit your needs.
Distribution: You may distribute the original or modified versions of Rujira.
Private Use: You are allowed to use Rujira without publicly disclosing your modifications.
However, the MIT License also includes certain responsibilities:
Attribution: You must include the original copyright notice and license in any significant portion of the software.
No Liability: The software is provided "as is," without warranty of any kind. The authors and contributors are not liable for any damages arising from its use.
Rujira follows open-source standards to promote transparency, collaboration, and community-driven development. By using the MIT License, we align with OSS best practices, which include:
Accessibility: The source code is freely available for anyone to inspect, contribute to, and improve.
Collaboration: Contributions from developers are welcome, subject to the project's contribution guidelines.
Security: Regular updates and community feedback ensure security vulnerabilities are addressed promptly.
We encourage developers to contribute back to the Rujira project and help enhance its features and stability.
We invite developers to collaborate on the Rujira project by:
Forking the repository.
Submitting pull requests for improvements.
Reporting bugs or security issues.
Participating in discussions and feature planning.
All contributions are governed by the MIT License and must adhere to the project's Code of Conduct.
By using Rujira, you agree to the terms of the MIT License and understand your rights and responsibilities under this open-source software model.
One of the defining features of RUJI Perps is locked collateral. This is the mechanism by which we ensure that each position's potential gains are well funded at all times. This can lead to some confusion about two similar but distinct topics: position size and locked collateral. We'll try to clarify that here.
NOTE: This document will intentionally use simplifying assumptions to make the math a bit easier, such as describing a collateral-is-quote market. If you try the same numbers in a collateral-is-base market—which includes any USD-denominated market—the numbers will be slightly different. But that shouldn't impact the intuition discussed here.
Position size represents how much exposure to price movement your position has. It is given by your deposit collateral times leverage. For example, if you deposit $500 in a long position and use 3x leverage, your exposure is equivalent to buying $1,500 of the asset on the spot market. If the price goes up by 10%, you will make $150 in profit, not $50.
NOTE: This also explains why all leveraged positions have a liquidation price. In the above example, if the price went down by 50%, the position would have lost $750, which is more than the $500 the trader deposited initially. Therefore, we need a liquidation price that stops a position from losing more money than the deposit collateral. In this case, that would be a 33% price decrease. This also explains why the more heavily leveraged a position, the sooner you'll be liquidated if the price moves against you.
Position size is what determines open interest and net interest in the platform:
Long open interest is the sum of the position sizes of all longs.
Short open interest is the sum of the position sizes of all shorts.
Total open interest is the sum of long and short open interest.
Net open interest is the difference between long and short open interest.
When you open a position, you specify a take profit price. Internally, the system computes how much collateral to borrow from the liquidity pools. This becomes your locked collateral, also known as counter side collateral, and represents the maximum profits you can achieve on this position.
Let's use the example above again. You have a long with a $1,500 position size. The current price is $10. You set a take profit price of $12, or a 20% price increase. That means your maximum profit is $1,500 * 20% == $300
. The protocol needs to borrow those $300 from the liquidity pool and lock it into your position.
By contrast, if you reduce your take profit price from $12 to $11, the protocol only needs to lock collateral for $1,500 * 10% == $150
. Notice that the position size remains the same in both cases, but the locked collateral is significantly different.
As you can see in this example, the closer the take profit price is to the entry price, the smaller the locked liquidity. This is one of the reasons we recommend traders think carefully about the take profit prices they want. Not only is this a risk mitigation mechanism, but it is also a cost savings. Reducing your locked liquidity will reduce both your trading fees and your borrow fees.
Let's continue with the above example. A trader opens a long with the parameters:
Deposit collateral
$500
Leverage
3x
Entry price
$10
Take profit price
$12
The system will derive the following from these parameters:
Trader position size
$1,500
Locked collateral
$300
Any gain the trader takes on the position will be withdrawn from the locked collateral, and vice-versa. Meaning, if the price moves up to $11:
The trader has experienced a 10% increase via price exposure
The trader will have profits of $1,500 * 10% == $150
The liquidity pool will lose those $150 to the trader
Caveat: as we discuss below, we strive to keep the protocol balanced, which will protect liquidity providers from these losses by ensuring for every loss on a long position, they will experience an equivalent gain on a short position, and vice versa.
Similarly, if the price decreases by 10% instead, the trader will lose $150 to the pool. This is equivalent to saying that, every time a trader opens a long, it's as if the liquidity providers have opened a short of the same position size. This leads to one more concept: counter-side leverage. In our example, the liquidity pool opened a $1,500 short position using $300 of collateral. This means that the pool's counter-side leverage on this position is 5x, versus the trader's 3x leverage. From the liquidity pool's perspective:
Locked collateral
$300
Counter side leverage
5x
Position size
$1,500
The reason why net open interest is so important to the protocol is because it represents exposure to price risk for liquidity providers. If the protocol has too much long interest, for example, liquidity providers are being forced to open up more short positions than long positions. If the actual price goes up, liquidity providers will lose funds to traders through impairment. It's true that if the price moves down instead, liquidity providers will instead make money through impairment. But we strive to insulate providers from risk. Therefore, our goal is to keep longs and shorts balanced, also known as:
0 net notional
Delta neutral
The inherent risk liquidity providers take on in this system is unbalanced price exposure. While—as just discussed—the protocol strives to minimize that risk, it cannot guarantee risk will be absent. And furthermore, in extreme market conditions (called a market meltdown or meltup), this risk is expected to be very high. In such a scenario, any liquidity in the pool is at risk of impairment, up to loss of 100% of their funds.
Liquidity providers can choose their level of risk, and receive commensurate rewards as a result. Therefore, there are two mechanisms for providing liquidity: LP tokens with no lock-up time, and xLP tokens with a 45 day lock-up window. LP tokens can be immediately withdrawn, provided that enough liquidity is in the system. xLP holders take on a higher degree of risk, and therefore receive higher rewards in terms of receiving a higher proportion of trade and borrow fees.
But to be clear, both groups are at risk of significant impairment. The protocol uses a dynamic borrow fee rate detection mechanism within the protocol to allow supply-and-demand forces to discover a fair market rate for this risk. In summary is: for assuming the risk of extreme market movements, LP and xLP holders are rewarded with high APRs on their deposits.
RUJI Perps is a decentralized, fully collateralized perpetual futures trading platform (Perp DEX) that allows users to trade tokens with up to 50x leverage, offering a secure and innovative trading experience. Unlike traditional perpetual futures platforms, RUJI Perps eliminates insolvency risk by ensuring all positions are fully funded, which guarantees the safety of traders' profits (PnL). With unique features such as locked liquidity, crypto-denominated pairs and cross margin, RUJI Perps is designed to overcome common challenges in the perpetual futures trading space, including liquidity imbalances and market manipulation.
Locked Liquidity: RUJI Perps introduces an innovative system of locked liquidity, where liquidity providers (LPs) deposit assets that are locked against traders' positions. These locked assets represent the maximum potential profits traders can achieve, ensuring there is always liquidity to pay for trader’s gains. This system prevents the risk of illiquidity even during extreme market conditions, ensuring that the platform can cover profits for all traders. Liquidity providers are compensated for the risks they take by receiving trading and borrow fees from traders.
Crypto-Denominated Pairs & Infinite Max Gains: For crypto-denominated pairs, RUJI Perps allows traders to open long positions with no cap on profits or fear of protocol solvency. As the base asset (e.g. BTC) increases in value, traders can benefit from infinite max gains in quote assets (e.g. USD). This offers a unique opportunity for traders to speculate on rising crypto prices without the limitations of stablecoin-denominated pairs. Trader collateral is denominated in the base asset (e.g. BTC), and gains are paid out for both long and short positions in the base asset. In short, when you win on RUJI Perps in a crypto-denominated market, you earn more of that crypto. This is a unique way to stack more of your favorite assets.
Trade directly from your wallet: Traders can start trading using the collateral in their wallet. Deposits are only required when opening a new position and are returned to traders' wallets when the position is closed, along with any gains or losses, once the position is closed. This ensures a smooth and efficient trading experience.
No Mark Price Manipulation: Unlike traditional platforms that rely on an internal mark price, RUJI Perps uses oracle based spot market prices for entry and PnL calculations. This increases the difficulty of price manipulation attacks, especially in low-volume environments, providing a more stable and transparent trading experience.
Low-cost leverage and Dynamic Fee Structures: Traders can use leverage with low fees, allowing them to maximize positions with minimal capital. With RUJI Perps, dynamic fees adjust based on market conditions, ensuring fair and competitive costs. Take profit triggers closer to your opening position result in lower fees for traders due to greater capital efficiency.
Insolvency Protection: RUJI Perps eliminates insolvency risks by ensuring that all positions are fully backed by locked liquidity. This is particularly important during volatile market conditions, where traditional platforms struggle to provide enough liquidity to cover profits.
Real yield for LPs: RUJI Perps provides real yield for liquidity providers with multiple risk-adjusted options. LPs provide single sided deposits (i.e. provide liquidity in a single asset such as BTC) and earn trading fees in exchange for taking on counter trading risk. The ability to provide single-sided liquidity means LPs are not exposed to any impermanent loss, but LPs do take on counter trading risk, i.e. the more traders lose, the more LPs win, and vice versa.
Sophisticated Trading Features: RUJI Perps provides features such as stop losses, take profits and limit orders. Traders can open multiple isolated positions, both long and short, on the same market. This feature allows for strategic hedging during volatile periods, as well as the flexibility to use different levels of leverage for each position.
Market Stability Incentives: To ensure system robustness and protect liquidity providers, RUJI Perps employs a delta neutrality fee to incentivize balanced positions and delta neutrality caps to prevent new positions from significantly unbalancing markets. The delta neutrality fund rewards traders, especially arbitrageurs, who contribute to market stability by keeping the system balanced. It collects lump-sum payments whenever trader actions exacerbate unbalanced markets though open, update, and close actions, and distributes rewards to traders who bring markets back towards a balanced, delta-neutral state.
RUJI Perps generates revenue from various fee streams, which are shared between liquidity providers and the protocol (these fees may be adjusted from time to time on a general or per market basis to ensure protocol robustness):
Trading Fees: Broken up into two components: (i) a percentage of the notional size, 0.1% by default; and (ii) a percentage of the counter collateral (funds borrowed from LPs for potential gains), 0.1% by default.
70% goes to LPs, and 30% to the protocol.
Borrow Fees: Dynamically adjusted based on supply and demand.
70% to LPs, 30% to the protocol.
Delta Neutrality Fees: This is primarily P2P, but anywhere between 5%-25% (depending on liquidity of the underlying spot market) is taken as a tax into the general fee bucket.
70% to LPs, 30% to the protocol.
Crank Fees: Collected by trading bots. This bots are run by the Rujira team, but can also be run independently by community members to operate the protocol in exchange for crank fee rewards.
100% to Crank operators.
Funding Fees: Funding payments are collected but are completely peer to peer.
100% to traders.
All protocol fees collected by RUJI Perps are split evenly between RUJI and RUNE stakers, ensuring strong integration with the broader THORChain ecosystem.
For users, all of these fees and/or earnings are factored into your PnL in real time.
On the Earn page, you can provide liquidity to the RUJI Perps protocol and earn yield for doing so.
Deposits are used by traders as counter-collateral for their positions. In return, you receive LP or xLP tokens that generate yield which comes from fees paid by traders. These are the APRs you see displayed for each liquidity pool.
Deposits are not risk-free. When traders win, counter-collateral is removed from the liquidity pool and LP/xLP tokens lose value. But when traders lose, your LP/xLP tokens increase in value. This is referred to as impairment.
LP tokens that are not currently locked in trader positions may be redeemed immediately for the liquidity that you provided.
Redeeming xLP tokens takes 45 days from when you submit the request—these tokens unlock linearly over this time period, and you receive the APR from LP tokens on the full amount.
Once you have accrued yield, you may withdraw it at any time directly to your wallet or reinvest it to earn additional yield.
RUJI Perps calculates price exposure by using external spot prices exclusively. These spot prices are provided by the underlying liquidity pools on THORChain, ensuring we always have the most accurate and up to date price information available on-chain.
Question: Do I need to have RUJI to use the Rujira App Layer and pay for gas? Answer: No, you do not need RUJI to use the App Layer. Gas on the App Layer is paid in RUNE and gas price is a THORChain's economic Mimir (i.e. a parameter upgradable by Node Operators). Initially gas price for interacting with the App Layer will be set to 0 as an experiment, meaning you will be able to use Rujira apps without paying any gas. If we see there are abuses, we will set the gas price to a non-null value. In such scenario, gas will be paid using RUNE. Question: Which wallet do I need to use the Rujira App Layer? Answer: Initially, you will be able to use , , , , , , , , and to interact with the Rujira App Layer. We plan to integrate with more wallets over time, and launch our own Rujira-focused mobile app (Station).
Question: What are Secured Assets? Answer: Secured Assets are essentially a fork of , but fungible. Secured Assets are a novel answer to the problems of cross-chain interoperability, providing an open source, decentralized, and secure cross-chain asset model powered by THORChain. Secured Assets are backed 1:1 by native assets secured in THORChain’s decentralized Asgard Vaults, which are secured by Threshold Signature Schemes (TSS) with the private keys split among ~100 independent node operators that churn every 3 days. 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.
Question: I am stuck and need help; who should I contact? Answer: For support, visit our and submit a support ticket. You can also reach out on . Avoid private messages from unknown sources to prevent scams.
: Being an App Layer on top of THORChain, it is key to understand how all assets on Rujira are secured by THORChain Base Layer.
: Key parts of Rujira and THORChain is built on the Cosmos tech stack, and the go-to smart contracting platform in the Cosmos ecosystem is CosmWasm, enabling cross-chain interoperability through WebAssembly (Wasm) contracts. It allows developers to write secure, efficient contracts in languages like Rust.
Once you have a good understanding of above, you are ready to dive into the —everything from development to staging to auditing to mainnet—enabling you to deploy fast onto Rujira.
Here is a practical guide on how to get started developing on the Rujira App Layer, prepared with love by Protocol:
: Your personal local Kujira blockchain. Start testing your smart contract in minutes
: Find out how you can interact with the Kujira blockchain and core products from your smart contract
: JS Pro? Understand how you can interact with the Kujira products from your application
: New to Kujira? Here’s your place to start! Find out what makes us special and what tools you can choose from
: Time to start building! Your central place around all things development
: Find out what’s happening in the whole Kujira ecosystem
: UI components in typescript
Kujira core repository
Javascript Interfaces for the Kujira blockchain
Interfaces and Utilities for Kujira Cosmwasm contracts
Kujira Networks (Typescript)
Kujira's
Public Kujira User Interface
Kujira Contract
Kujira contracts
Mock interface to test Cosmwasm contracts
Kujira DEX bot integration
Finally, contains the Entropy Beacon docs
THORChain builds in the open—and Rujira is no exception—hence make sure to check the file on Gitlab before starting up development on Rujira.
Set up your environment: Ensure that you have Rust and the necessary development tools installed. You can follow .
For more details on writing CosmWasm contracts, refer to the official .
For more comprehensive testing, you can use CosmWasm’s framework, which simulates a chain environment in Rust. This allows you to test your contract’s interaction with other contracts and the chain itself.
Permissionless deployment: Most developers will want to deploy to a permissionless testnet to verify their contract in a real end-to-end environment. You can use the CosmWasm binary to handle deployments, or utilize the to interact with CosmWasm contracts via a web interface.
The below chart illustrates how the strategy works with the various flow of funds. A complete walkthrough is available in this .
For more details, check the .
The mechanisms we use for this are incentives via funding rate payments and delta neutrality fees, which provide a profit motive for the implementation of , also known as .
For more information, please check:
RUJI Collections, operating under the Gojira brand & identity, is a sustainable NFT marketplace built on a revolutionary tech stack that enables higher creator earnings & platform revenue, fair & bot-free launches, mint customization, NFT-Fi, and RWA integrations.
Your portal to a colorful world of NFTs, Gojira reinvents NFT technology with its special auction mechanics, a new developer specification, and a unique focus on composability.
Gojira features deep integration with the rest of the Rujira Alliance.
Mint NFT collections with RUJI or USDC: Spend RUJI to buy NFTs whose value and growth will directly align with the Rujira ecosystem. Collection creators also have the option to enable minting with USDC.
Efficient auction design: NFTs are minted and traded on Gojira with a unique auction style optimized for blockchain performance, inspired by RUJI Ventures. Creators (or holders) will set their launch (or listing) date, and during the 48-hour auction period that follows, users can place bids to mint an NFT at their desired price and increase those bids as the auction progresses. Once the auction has closed, winners send a claim transaction to mint the NFT (or multiple) to their wallet, and any unsuccessful bids can be withdrawn. There are multiple auction types, including a descending price variant.
Accessible aftermarket sales: Gojira provides extensive support for users to buy and sell tokens (NFTs) after they’re minted, and will generate additional revenue from a healthy trading market. Holders can choose to list their tokens for immediate sale or discover a fair price with a new auction, and buyers can make offers for any tokens (whether they are listed or not), which the holder can accept or reject.
Enabling real-world applications: Gojira NFTs implement the GW721 specification, a superset of the Cosmos-standard CW721 with a greatly improved developer experience and unique features that allow creators to build endless new use-cases on top of our platform in a composable manner. Our first planned launch, Dive Domains (an on-chain nameservice built on Gojira NFTs), will showcase these capabilities.
Ecosystem content hub: Gojira features a native content hub focusing on the wider Rujira ecosystem. It will include a creator hub and Rujira community articles (think Rujira’s own Medium platform).
Increases RUJI utility: Spend RUJI to buy NFTs whose value and growth directly align with the Rujira ecosystem. At the same time, Gojira is one of multiple Rujira core products so RUJI-denominated collections should see limited downside risk from reflexivity.
Alignment with creators: Gojira’s unique auction mechanics incentivize users to bid more money on collections. This means Gojira can charge bigger fees on excess profits and creators can make a killing relative to other platforms.
Fair, bot-free launches: By prioritizing bigger bids over speed, the underlying auction model features behavioral incentives that prevent bots from gaming launches. Everyone has an equal opportunity to participate.
Optimized blockchain performance: Bot-free auctions spread activity out over hours rather than seconds. As a result, Gojira does not congest the Rujira network even during periods of high usage and provides a superior user experience.
Greatly improved developer experience: Our new smart contract framework features on-chain NFT attributes and eliminates any need to customize collection contracts for basic features. Gojira NFTs are also inherently upgradeable and composable.
Leverage Rujira DeFi: Gojira is the only NFT marketplace in crypto with core access to an extensive selection of exclusive DeFi applications.
Community building: NFT collections are excellent ways to onboard new users into the Rujira ecosystem and engage in general community building. Gojira’s content platform further unites the broader ecosystem.
Gojira’s auction mechanism ensures that successful NFT launches raise a certain “baseline level of funding”. Creators can fully customize this target baseline. We refer to any amount raised beyond that minimum threshold as “excess profit”.
A 4% fee is collected from baseline funding raised in a mint auction. A 15% fee will also be collected from any excess profit in a mint auction.
A 2% fee is collected from the total revenue for aftermarket auctions and trades.
The standard 50/50 revenue share with TC Base Layer applies to all fees collected by Gojira.
#d534ea
#843ef6
#5634d1
#080e50
#ebedf3
#5dfbd0
#38a989
#1892e6
#1e6599
#f57b00
#fe5721
#e53a37
#b81c1d
#5e7e8d
#90a5ae
#22242d
#171620
When you're ready to deploy your smart contract, you’ll need a local build of the chain core. This will allow you to store your code on-chain and submit governance proposals to instantiate it.
Clone the Rujira core repository:
Now that you've set up the environment, you're ready to store your code on-chain.
To optimize your contract's code, run the following command:
You’ll need a local account to handle transactions.
This will generate a seed phrase and an associated Kujira address for your account. Make sure to store the seed phrase safely. You’ll also need to fund this address with KUJI tokens before proceeding to the next step.
To store the optimized code on-chain, run the following:
Upon successful execution, logs will be generated. These logs contain the code_id
of your contract, which will look something like this:
Your code is now stored on-chain and behaves similarly to a class in an object-oriented language. Next, you need to instantiate the contract so you can interact with it.
On Kujira, instantiation must be done via a governance proposal. This ensures the quality and security of code and dApps on the network.
Run the following command to submit an instantiation proposal:
This creates a proposal at the funding stage. You can then visit Rujira Governance to deposit funds and open it for voting.
After the proposal passes and the contract is instantiated, the contract will have its own unique address. You can find the contract address with the following query:
Once the contract is instantiated, you're ready to move on to building the UI for your newly deployed smart contract.
BTC-BTC (BA) ↔ BTC.BTC (L1)
Redeeming
Moving into and out of pools
Depositing
Currently, Secured Assets support 1:1 redemption and deposits. A fee structure will be introduced in a future update. These assets will appear alongside RUNE on your THOR address.
The first app utilizing these assets will be RUJI Trade orderbook DEX, which introduces limit orders. The user experience will be:
Deposit/Swap: Users can deposit or swap to BTC-BTC to fund their accounts.
Swaps: For example, a BTC-BTC to ETH-USDC swap will use a wrapper over MsgDeposit
, handling:
Thornames
Affiliate fees
Safety checks
To THOR EOA: ETH-USDC is swapped via base pools and delivered to the user’s THOR address.
To CosmWasm (CW) Contract: ETH-USDC is swapped, and DexAgg
features are leveraged to call a contract on THOR with specific parameters.
To L1: Similar to current behavior.
IN: MsgDeposit
OUT: txOut
or DexAgg.transferOutAndCall()
All flows include comprehensive safety handling, adhering to existing THORChain (TC) mechanisms without bypassing critical processes.
We will add bindings for the following whitelisted query paths:
/inbound_addresses
: For checking halting status
/pools
: For pricing and depth
/pool/{asset}
: For querying specific asset pools
There are known attack vectors related to non-deterministic query aspects that could potentially lead to chain halts. These are being actively monitored.
BaseProtocolFeeShare is not required for RUJI Trade orderbook DEX since it operates using BaseLayerPools and does not introduce any additional fee-sharing logic.
If you're new to CosmWasm and Smart Contracts, we recommend starting with the . This template will help you understand the basic interfaces and models of CosmWasm smart contracts.
The assets available on Rujira will be Secured Assets from THORChain, with the to be a dash '-'. E.g. ETH.ETH
is L1. ETH-ETH
will be a Secured Asset.
You can find out more on on docs.thorchain.org.
Secured Assets are fully supported on the Cosmos ecosystem represented as tokens using the bank module. They behave like traditional trade assets and can seamlessly interact with Base Layer pools. These interactions include:
Relevant PR: