Bringing Macro Markets Onchain with Ostium
A deep dive on the Ostium Protocol and the role of perpetuals in bringing macro markets onchain.
The Digitization of Financial Services
Throughout the history of human civilization, technology and capital markets have evolved alongside one another. The origins of written language can be traced back to ledgers, dating back thousands of years to Sumerian Cuneiform in ancient Mesopotamia, where signs recorded on clay tablets were used to keep track of the ownership of livestock and commodities. Doing so effectively allowed the Sumerians to become the most advanced ancient civilization at the time, as they were now able to efficiently manage economic resources, facilitate trade and taxation, and allocate goods and labor within city-states.
The ability to accurately record and verify asset ownership ultimately formed the backbone of civil societies and modern economies. Without such a mechanism, chaos ensues. The tulip mania bubble, the stock market crash of 1929, and the great financial crisis of 2008, are all premier historical examples of the consequences in failing to provide reliable settlement and ownership guarantees of economic assets.
As human civilizations have evolved, so have ledgers; from clay tablets and paper certificates, to computers and software programs. Technological innovation may often conform to fit within an existing market structure, or conversely new technologies may create opportunities to disrupt a market's existing structure, transforming its underlying architecture, operations, and the actors involved.
Often, adoption of new technologies in the financial services sector was not voluntary, but instead a response to critical situations in dire need of fixing. The Paperwork Crunch of the 60s led to the launch of NASDAQ, the world’s "first electronic stock market", in 1971. This marked the biggest transformation of securities trade clearing and settlement systems to date. In 1973, the Depository Trust Company (DTC) was founded to remove the mobility of certificate transfers by custodying certificates in a single depository with a unified accounting ledger. However, it wasn’t until after 9/11 and the grounding of air travel in the US that the Check Clearing for the 21st Century Act was passed, making it legally permissible to clear images of paper checks instead of the paper copy itself. It took the flooding of the DTCC vaults during Hurricane Sandy in 2012, which saw nearly 1.7 million security certificates damaged, to shift away from paper checks altogether.
Fast forward to today and there is still much room for improvement. Data from the DTCC shows the real cost associated with the difficulties of this rather complex and antiquated system, with upwards of tens of billions US dollars failing to deliver a trade contract on a daily basis.
The associated risks are well-explained by the DTCC: “Not only does the original trade fail, but the party that bought the securities may have already pledged them in a subsequent trade, and now that trade too will involve a failure-to-deliver, thus creating a cascading effect.”
This begs the question – do blockchains fix this?
The Role of Tokenization
At a high level, tokenization is the process of encoding assets of economic value, as well as their associated ownership claims, on a blockchain. Blockchains are digital distributed ledgers that record and store transactional information, providing immutability (barring a theoretical but increasingly difficult or costly attack vector), and transparency of events, which in turn enables public observability, wherein anyone can observe and verify whether an event took place or not.
‘Real-world assets' , or RWAs, have become a colloquial term for the various non-crypto assets that can be tokenized. (Kyle Samani of Multicoin Capital points out that the use of ‘real-world’ is redundant “You are telling the people who are not in crypto that you do not live in the real world, and that you want the real world to come to bizarro crypto world”, but for the sake of convenience this paper will continue to use the term RWAs. ) Real-world assets can range from financial assets such as fiat currencies, commodities, equities, and bonds to illiquid assets such as real estate.
The design of blockchains offer a number of compelling benefits for tokenizing RWAs and virtually any tradable asset. For starters, the atomic nature of blockchains mitigates the principal settlement risks of delivery-versus-payment systems, as blockchain transactions often exist as multi-legged operations wherein either all legs succeed or none do at all the transaction fails. Using blockchains also eliminates the need for various layers of intermediaries, thereby reducing costs for buyers and sellers. In turn, this allows for improved efficiency in markets that oversee the buying and selling of various assets. Greater efficiency, coupled with the transparency of information that blockchains provide, unlocks new opportunities for accessibility of financial assets. Another key benefit that can be realized from tokenization is increased liquidity, wherein easier access to certain asset classes allows for a greater number of potential market participants therein allowing liquidity for their markets to grow and deepen over time. This goes hand in hand with the onset of fractional ownership, which has yielded tremendous results for the “new generation” of financial services businesses like Robinhood.
Tokenization is not a new concept. One could argue that the history of tokenization can be traced back to Colored Coins on Bitcoin; the core idea, proposed in a 2012 research paper by Meni Rosenfeld, was to "color" a small fraction of a Bitcoin with additional metadata, effectively creating a unique token that could represent ownership of an asset other than Bitcoin itself, such as commodities, stocks, or bonds. Though there was a significant amount of development around colored coins at the time, the idea was made obsolete by further developments in the crypto industry.. Another early iteration of tokenization was DigixDAO, founded in Singapore in 2014, which was the first crowdsale and major DAO on Ethereum. Digix would allow for the public verification of an asset’s existence through its chain of custody via its Proof of Provenance (PoP) protocol, built on top of Ethereum and the InterPlanetary File System (IPFS). Tether has been minting USDT onchain by depositing an equivalent amount of fiat currency into their reserve bank accounts and then issuing the corresponding amount of USDT tokens on the blockchain since 2015. Circle has been doing the same since 2018 with USDC. At the time of writing, the total value of RWAs onchain exceeds $175B, with stablecoins accounting for an overwhelming majority of this number ($164B), as per the Rwa.xyz dashboard.
Where Tokenization Falls Short
The tokenization of financial assets such as fiat currencies, commodities, equities, and bonds, is believed by some, including Larry Fink, to be the future of the financial industry. In theory, anything and everything of economic value can be tokenized. However, as compelling as some of the key benefits to trading assets on a blockchain may be, it’s important to consider the shortcomings of tokenization, and consequently, consider if there are alternative financial instruments which may enable trading assets on blockchains even more effectively.
Overall, tokenizing RWAs requires significant effort and diligence to manage, from an operational and custodial perspective. In order to ensure tokenized assets accurately reflect their physical underlying counterparts, token issuers must either purchase the underlying every time a new token is minted, or sell every time a token is burned. Depending on the asset in question, issuers must also be able to manage any operations pertaining to the physical asset (i.e. precious metals token issuers must manage the storage, insurance, delivery, and sourcing of the metals in addition to managing the asset’s reserves). Overall, this can be an arduous task that incurs high costs and requires significant time to implement in practice, especially at a scalable level.
The adoption of tokenized assets will also require significant progress and action from a regulatory and legal perspective, which can often be a long process as it varies by different nations and regions. In the US, the past four years have been largely unfavorable for crypto products and services. Meanwhile over in the EU, the MiCA regulation framework is set to take place by the end of the year, while Singapore and Hong Kong have been embracing more crypto-friendly policies. Determining ownership rights and handling ensuing disputes also bring about legal complications, and local laws and regulations (i.e. at the state or city level) make this even trickier.
What if, instead of ownership, investors simply want to get price exposure to these assets in an easier, less costly, and overall more efficient way? This is where synthetics come in. Synthetics are financial instruments built to mimic the value of an underlying asset without requiring said asset to be held by the investor. Synthetics can be created and traded on a blockchain without actually needing to go through any of the logistically complex processes involved with tokenization, allowing for the streamlined creation of onchain markets. To this day, only one type of synthetic derivative has been particularly successful - and so, all roads lead to perps.
The Role of Perpetuals
Perpetual contracts (perps) are a type of derivatives contract which allow investors to speculate on an asset’s future price without a predefined expiry. These financial instruments can be held indefinitely, a key distinction from traditional derivatives contracts which involve an expiration date, before or during which the contract must be settled. Similar to contracts-for-difference (CFDs), perpetuals provide a financial instrument for investors to speculate on an asset’s price movement for an indefinite period with leverage, but do so while maintaining a single uniform contract.
Though a great deal of inspiration was taken from the Undated Futures market by the Chinese Gold and Silver exchange of Hong Kong, perpetual futures were first introduced by Robert Shiller in a 1992 research paper, in response to a lack of liquid derivatives markets for many of the components of global wealth such as human capital/labor costs, real estate, private financial assets, and macroeconomic indices.
“To create a market for the present value of a cash flow represented by some dividends or rent index, we need to create a perpetual claim on a cash flow represented by the index.” - Shiller
Shiller's motivation was to address the absence of hedging instruments for infrequently-priced, illiquid markets, proposing perpetual futures contracts as superior comprehensive risk management tools, which could be used across a wide range of use cases such as labor cost markets, commercial real estate, commodities and agriculture, to name a few. Given that these markets often faced significant spreads, Shiller believed perpetual contracts could provide great cost savings for hedgers and reduce basis risk. In short, perpetual futures aim to facilitate price discovery for assets with illiquid or hard-to-measure prices.
Unfortunately for Shiller, the difficulties associated with implementing perpetual futures contracts hindered their adoption in capital markets and the financial services sector. This included regulatory hurdles, a lack of sufficient infrastructure, complexity in appropriately pricing underlying assets, to name a few, but in the end, perpetual futures were traded almost exclusively in over the counter (OTC) markets.
Believe it or not, the first use-case for perpetuals was trading crypto, and it remains the only active use-case to date.
Perpetuals in Crypto
In 2011, Alexey Bragin sought a way to differentiate his Bitcoin futures ICBIT exchange from the rest of the market, which led to the creation of the "inverse perpetual" in which the contract was settled in Bitcoin but priced in USD. However, it wasn’t until BitMEX rolled out XBTUSD, their first perpetual leveraged swap product, that perpetuals started to pick up significant adoption. BitMEX rebranded their derivatives contract as the Perpetual Swap and introduced features aimed to attract smaller, crypto-native traders as opposed to larger financial institutions, including small contract sizes, a bitcoin-inspired contract design, minimal margins, and lower trading fees.
At this time, crypto was mostly being traded off-chain via centralized exchanges (CEXs), though this would soon begin to change with the rise of spot decentralized exchanges (DEXs) in the late 2010s. At their core, DEXs were simply sets of smart contracts coupled with an interface for users to interact with from their wallets, enabling anyone to trade any supported asset while retaining full custody over their assets. The first derivatives DEX came about in August 2017 when Antonio Juliano launched dYdX, on Ethereum, which eventually shifted its focus to become the first perpetuals DEX in April 2021 with dYdX v3.
Since then, the number of perps DEXs has continued to grow with the rise of L2s, and onchain perps have seen over $2.7T in trading volume lifetime, per Artemis.
There are some key features that perpetual exchanges have in common, such as the funding rate, the underlying price discovery mechanism. Perpetuals lack an expiry and therefore require an ongoing payment mechanism in which the counterparties pay one another depending on market conditions at a given time. When the funding rate is positive, longs pay shorts. When the funding rate is negative, shorts pay longs.
That said, the rising number of perp DEXs has led to a variety of implementations in design and function worth dissecting.
Order Book
Order books have long since been the default price discovery mechanism for exchanges, wherein buy and sell orders are listed and matched on a unified matching engine. One common adaptation of this model with perps has been to utilize off-chain orderbooks for trade matching, while execution and settling trades onchain. This model enabled protocols to avoid incurring gas fees and being hindered by network performance, while still benefiting from the transparency of onchain settlement and self-custody for traders. Taking this further are fully onchain orderbooks, in which the matching of trades is also performed onchain. This model has historically been challenging to implement, as the latency and throughput constraints of the underlying chains made it viable for sophisticated actors to perform frontrunning and sandwiching attacks and extract value at the expense of uninformed retail traders who in turn received worse price settlement on trades. However, the rise of high-performance execution environments - whether it be new general-purpose L1s, app-specific chains, or rollups - seeks to alleviate this issue by significantly reducing block times therefore minimizing information asymmetries among market participants.
Peer-to-Pool
Peer-to-pool perp DEXs utilize a self-matching algorithm where buy and sell orders are routed through a central liquidity pool, and matched using a price feed oracle. Pioneered by GMX, this model employed two counterparties to operate- liquidity providers (LPs) who would lend capital to the central pool, and traders who would utilize this capital to fulfill their trades. Though LPs bear inventory risk, they are subsided by a combination of trading fees, liquidation rewards, and funding fees for doing so, while traders benefit from price execution at real-time price indices with lower slippage. However, this dynamic created an adversarial environment between LPs and traders: LPs profited from traders’ negative PnL, but suffered from pool rebalances when traders were profitable.
Virtual AMM
Another design implementation that has emerged in the perp DEX landscape is the virtual AMM (vAMM) pioneered by Perpetual Protocol (great name). Similar to Peer-to-Pool, vAMMs utilize a two-counterparty system composed of LPs and traders. Rather than utilizing real tokens for liquidity, however, vAMMs utilize virtual, synthetic assets (i.e. perps). In this model there is no actual liquidity pool in the protocol; traders are able to make leveraged trades on assets which are stored in a smart contract vault.
Perp DEXs have come a long way since their inception, but their potential has still been largely untapped as they have been constrained to trading crypto assets. Let’s dive into one particular protocol seeking to extend the utilities of onchain perps beyond crypto assets, to be able to trade virtually everything in one’s eToro account onchain - Ostium Protocol.
Ostium Protocol Deep Dive
What is Ostium?
The Ostium Protocol is an open-source decentralized exchange for trading blue-chip crypto assets and RWAs as perpetual contracts onchain. At its core, the protocol functions as a set of smart contracts that live on the Arbitrum Layer 2, made up of a trading engine and a liquidity layer, as well as an in-house oracle and automated keeper system, key supporting infrastructure components. Putting it all together, the protocol provides several key offerings: virtual exposure to off-chain assets that do not natively exist onchain, a Shared Liquidity Layer made up of two capital pools (the Liquidity Buffer + the Market Making Vault) to settle trades and function as counterparties to traders, near sub-second price feeds enabled by a dual oracle system, automation for key trading features including liquidations, stop and limit orders, and a strategic risk-adjusted fee structure to capture and minimize the directional risk an open position poses to the Shared Liquidity Layer.
From a design perspective Ostium chose to utilize a peer-to-pool model, though with its own unique twist which will be elaborated on further below. Choosing a peer-to-pool model makes sense given that markets are simply not yet mature enough to market-make for long-tail assets like soybeans or hog prices; utilizing a shared liquidity layer for price discovery allows for a more scalable defi-native model instead.
Ostium’s Vision
Ostium believes the best way to serve demand among traders for leveraged, short- and mid-term price exposure to RWAs onchain is via oracle-based perpetuals. Its goal is simple too: become the go-to destination for trading virtually any asset as an oracle-based perpetual contract.
The crypto markets and the macroeconomic environment are increasingly converging, and the post-pandemic macroeconomic landscape has wet the appetites of an increasing number of macro-aware traders. Crypto’s reaction to the unwind of the Yen carry trade and the Nikkei is a telling example; if one were to go around telling altcoin traders to keep track of what the Bank of Japan was doing as it would have critical implications for the performance of their tokens, they’d be laughed out of the room. Last week, however, this theory was proven to be correct. The incredible rise of Polymarket in the US election year has also demonstrated the appetite for speculating on the outcome of real-world events; in fact there has even been a positive correlation between the price of BTC and Donald Trump’s presidency odds.
Ostium puts forth the notion that perpetual contracts will reign as the superior financial instrument for enabling a proliferation of capital markets on the blockchain.
Let’s dive deeper into the various components that work together to enable this vision.
Key Protocol Components
Ostium Trading Engine
The Ostium trading engine is the key feature of the Ostium protocol, facilitating the trade of the protocol’s supported assets by coordinating interaction between traders and LPs.
Upon depositing collateral, traders can choose to go long or short; place a market, limit, or stop order, and customize their leverage settings (Ostium offers up to 200x). Gelato Functions are used to continuously track price changes and determine the need for automated order execution (liquidations, stop losses, take profit orders), while prices are called on-demand using a pull-based oracle mechanism. While their position is open, users can update their positions (Update Take Profit, Update Stop Loss, or Add Collateral) without incurring additional fees. Positions can be closed either manually or automatically; triggered by either a Stop Loss order (negative PnL), Take Profit (positive PnL) order, or Liquidation. If the value of a trader's collateral has decreased by 90%, the Keepers trigger a liquidation event, in which the remaining collateral (10%) is transferred to the Market Making Vault as a liquidation reward.
Open Price and Price Impact
To protect LP capital from the associated risks of peer-to-pool based pricing models, Ostium implements a methodology for price discovery which incorporates real-time market liquidity conditions when determining the price at which a trader opens a position. While the mid-price is often used as a neutral valuation metric, relying solely on it can be misleading in scenarios where liquidity significantly affects the quality of execution a trader receives. Instead, Ostium employs a scaled bid-ask spread model that more accurately reflects the true market conditions and the costs associated with different trade sizes.
The bid-ask spread, which represents the difference between the highest price buyers are willing to pay (bid) and the lowest price sellers are willing to accept (ask), is dynamically adjusted in Ostium’s model. Under this model, the spread scales linearly with position size—meaning that larger trades incur a proportionately larger spread. Therefore, instead of always being quoted the bid or ask, traders are quoted a scaled version of these prices, such as 0.1 times the mid-bid spread or 2 times the mid-ask spread, depending on the specific circumstances of the trade.
When a trader opens a long position, a price derived from a scaled ask price is quoted, while a scaled bid price is used when opening a short position. Similarly, when closing a long position, a scaled bid price is quoted, and a scaled ask price is quoted for closing a short position.
This is represented by the following formula (given K as a constant):
Note that throughout the process of opening a position, Ostium charges a one-time fee to the user, and then compounding fees while a position is open. These will be expanded upon further in the “Fee Structure” section below.
Ostium Liquidity Layer
Rather than operating under a central limit order book (CLOB) model, Ostium functions as a liquidity pool based DEX, similar to the likes of well-known perp DEXs such as GMX. This model enables the protocol to sustain imbalances in Open Interest, however there are key distinctions to account for between Ostium’s model and traditional perpetuals protocols, wherein LPs benefit directly from trader losses, forming an adversarial relationship between two sets of market participants which are both equally important to the protocol.
Ostium’s Shared Liquidity Layer (SLL) is made up of two capital pools - a Liquidity Buffer which serves as the first layer of settlement for positive PnL trades and a Market Making Vault which acts as a backup in the event that the Liquidity Buffer is depleted. Note that capital in the Liquidity Buffer comes from accrued traders’ PnL, while the market making vault is open to deposits from LPs to earn liquidation rewards and 50% of position opening fees. The core idea is that by creating two siloed pools with strategically defined fee structures, LPs benefit primarily from increased trading volume and OI growth. The LB is designed to absorb trader PnL thereby stabilizing LPs’ APY in the event of sustained positive PnL for traders, meaning traders and LPs should simultaneously benefit from protocol growth.
Liquidity Buffer
The LB is the primary settlement layer for trades on Ostium, meaning that an immediate trading counterparty is not required for trades to be executed. Given that LPs cannot deposit or withdraw from the LB, this ensures that value accrued to LB is reflective of organic trading activity on Ostium.
When a position is closed, the LB provides capital to Positive PnL trades while accruing any value from Negative PnL trades. When one side is imbalanced, thereby seeing the OI skew away from 0, the LB absorbs the volatility in trader returns and helps stabilize the APY LPs earn.
Consider the following possible states of delta exposure in the protocol based on market conditions;
Perfect Balance - When traders’ long and short positions are equal, the protocol’s delta exposure is 0, and the market is stable as the positions naturally offset each other.
Imbalanced OI - When there is an imbalance in trader positions, i.e more longs than shorts or vice versa, the shared liquidity layer steps in to cover the imbalance and to regain the delta exposure.
Extreme Imbalanced OI - When no traders are taking one side of the market (either all long or all short positions are closed), the liquidity buffer bears all the delta exposure.
If a series of large trades with positive PnL are closed consecutively, there is potential for the Liquidity Buffer to be drained due to the settlements it must pay out. If this instance occurs, the protocol then turns to the Market Making Vaults (MMVs) for trade settlement.
Market Making Vaults
Ostium’s MMVs are smart contracts structured as liquidity pools, where LPs deposit capital to earn an APY defined by liquidation rewards and 50% of trader opening fees, for the delta exposure risk they take on. This will play a particularly important role in the early stages of the protocol, as it is likely that sustained trader PnL will take a while to accrue to the LB, therefore incentivizing LPs to deposit into the MMV will be crucial for the Ostium Protocol.
Upon depositing capital into the MMV, LPs receive an Ostium Liquidity Provider (OLP) token which functions as a standard receipt-of-deposit. OLP tokens are minted upon deposit and burned upon withdrawal, and LP rewards are distributed on a rebasing model, wherein they are compounded directly to increase the value of the OLP token (if Alice starts with 100 OLP and earns 10% on rewards, she will have 110 OLP upon withdrawal). As a means of incentivizing stickier capital among LPs, Ostium will enable annualized locking boosts favoring long-term lockers with greater rewards.
Supporting Infrastructure
Ostium utilizes two critical off-chain infrastructure components, an oracle and an automated keeper system, designed to support operations on the Trading Engine and SLL as efficiently as possible.
RWA oracle
In order to account for the intricacies of RWAs (i.e out-of-market hours, future contract rolls, price gaps at market open), especially when dealing with various long-tail assets which are less commonly traded and may see lower trading volumes and higher volatility, Ostium Labs developed an in-house oracle service configured to their unique needs. However, operating a fully in-house oracle service imposes significant trust assumptions on a protocol’s users’ behalf, as the outcome of their trades and liquidity provision depends on the functionality of that oracle. To ensure disintermediation and mitigate the associated risks with operating an in-house oracle, the node infrastructure is operated and managed by Stork Network, an open data marketplace comprising a decentralized network of data publishers. Note that this model operates on a pull-based oracle system, meaning that prices are only communicated onchain when explicitly required for trade execution in order to save costs associated with constantly publishing data onchain.
In short- Ostium’s RWA oracle is custom-built by Ostium Labs, while its nodes are operated and managed by Stork Network.
Crypto Oracle
Aside from RWAs, Ostium also offers leveraged trading of BTC and ETH. For these assets, prices are pulled using Chainlink Data Streams, which are purpose-built for providing applications with on-demand access to high-frequency market data.
Automated Keeper System
In order to execute and manage conditional trades (i.e. “go long HOG Prices at $80, take profit at $100”), perp DEXs utilize specialized agents called Keepers. It’s common practice for protocols to run the Keepers themselves before gradually decentralizing over time, though it’s never guaranteed they will, in fact, decentralize. The experiences of traders and LPs are still that much more dependent on the underlying protocol under this method. As such, Ostium has outsourced the responsibility of running their Keeper network to the Gelato Network; from day one, Gelato Functions will be used to monitor price requests routed onchain for market orders, as well as existing open trades for conditions necessary to trigger automated orders for RWAs. Automated orders include Limit Orders, Stop Limit Orders, Take Profits, Stop Losses, and Liquidations.
Fee Structure
Ostium seeks to ensure each source of risk in the protocol is mitigated through a strategic implementation of fees - Open Interest skew, high pool utilization, and high asset volatility. Ostium charges a fixed fee at opening a position and compounding fees for maintaining open positions. Fixed fees are used to pay for associated infrastructure costs, while variable fees are intended to mitigate the various protocol risks mentioned above.
Opening Fee
feeProtocolOpen=makerCharge+takerCharge+utilizationCharge
When opening a position, Ostium charges an opening fee that is a function of five variables to account for external factors affecting a specific trade. Three of these variables are contingent on the trader's asset, leverage, and position size, and the remaining two are contingent on the protocol's OI skew and utilization conditions. Opening fees are sized according to their impact on protocol conditions; trades that increase OI skew (i.e. short position which increases short OI for an asset) create greater delta exposure for the LB and therefore incur a higher baseline fee. Additionally, if a trade pushes OI above a certain threshold during periods of high utilization, a utilization charge is also applied. As a means of encouraging arbitrage on Ostium, which is critical for maintaining stability and balance of prices, a trader is charged a “taker” fee if the amount of leverage exceeds 10x or if OI skew increases with their trade. Conversely, a trader is charged a “maker” fee if the amount of leverage is below 10x and OI skew reduces with this trade.
Maintenance Fees
Throughout the duration of a trade (while a position is open), compounding fees are applied to a) help steer the protocol OI towards equilibrium through funding fees and b) mitigate the directional risk exposure of LPs through volatility fees.
The funding fee functions like a standard funding rate on perpetual exchanges, in that they are designed to close the gap between long and short OI, thereby bringing the protocol to an equilibrium and minimizing delta risk for LPs in the MMV. However, unlike CEXs where funding rate fees can be claimed, Ostium automatically charges the position value of the “popular” side and injects this value into the PnL of the “unpopular” side, and the returns are realized in a trader’s PnL at position close. Furthermore, this fee is velocity-based, meaning it is an integral of both the length and magnitude of prior imbalances. This design feature is intended to incentivize arbitrageurs to fully close OI imbalances, compensating arbitrage behavior to a greater extent if the negative externality from a prior state was greater.
Expressed as a percentage per day, the formula can be mathematically represented as:
Meanwhile, the Volatility Fee is intended to capture the externality of market volatility for LPs. The fee is automatically charged to a trader's position size and subtracted from position PnL at position closing. Considerably, from an LP perspective, a position that is 10x long on a relatively stable asset such as the Euro poses far less risk than a position that is 10x long on an asset such as Oil, which sees greater intraday swings. It’s important for LPs to be appropriately compensated for the additional volatility risk they may take on. However, it’s also important to ensure that this fee does not discourage traders from trading volatile assets and therefore impact the funding rate. As such, the Volatility Fee was strategically designed to be 10x lower than the Funding Fee. The fee is automatically charged to a trader's position size and subtracted from position PnL at position closing, and can be mathematically represented as:
fr(v)=F(Vs(s−1)Vs−v−s+1)
LP Rewards
It’s worth mentioning that LPs who deposit capital into the MMVs receive a) 50% of opening fees, and b) 100% of liquidation rewards.
To put it all together, here is what the flow of capital looks like at each stage of a trade on Ostium;
Opening trades: a % of the initial collateral is reserved for the protocol opening fee and evenly (50/50) distributed between Market Making Vault (where LPs deposit) and Protocol Revenue.
Holding trades: volatility fee is accrued from period to period on the open positions and goes directly to the Liquidity Buffer.
Closing trades
In the event of Positive PnL:
Liquidity Buffer > 0: Liquidity Buffer settles trades;
Liquidity Buffer = 0: LP MM Vault settles trades, if and only if the Liquidity Buffer is depleted (further details here):
In the event of Negative PnL:
Not Liquidated: Liquidity Buffer receives traders losses;
Liquidated: 90% of initial collateral (traders loss) goes to the Liquidity Buffer and the remaining 10% goes to the LP MM Vault (liquidation reward)
Risks and Considerations
The primary risk with trading perpetuals on any exchange comes down to liquidation risk. When opening a position, traders deposit collateral; with leverage, they can take on a position size that is substantially larger than the value of their collateral (up to 20x on Ostium). However, the flipside to this is that losses are magnified just as significantly as gains, potentially leading to rapid liquidation if the market suddenly moves against the trader. When a trader's losses equal the initial collateral used to open the position, the position must be liquidated to avoid the protocol from incurring bad debt (a deficit that must be covered). On Ostium, liquidations must occur before collateral value has declined to zero; therefore liquidation takes place when collateral value has fallen to 10% of original collateral deposited. While Ostium has developed a number of built-in mechanisms to mitigate directional risk that affects liquidations, traders opening positions with leverage must still be well-versed in these associated risks and implied losses.
On the other hand, the greatest risk for LPs depositing into the MMV is directional exposure risk; this occurs when LPs are exposed to sudden price changes in the underlying market, caused by high OI imbalance and high volatility occurring simultaneously. The following matrix illustrates how directional exposure risk changes accordingly:
In collaboration with Chaos Labs, Ostium developed the Imbalance Score, a metric for assessing the current overall directional exposure risk experienced by the protocol. The Imbalance Score takes into account not just the imbalances in open interest (OI), but also the volatility and correlations between different assets. In short, asset imbalances indicate the extent to which the market is skewed towards long or short positions on certain assets, assets with higher volatility contribute more to the risk score, and positively correlated assets pose greater risks than inversely correlated pairs. According to Ostium, the team plans to continue working with Chaos Labs to actively monitor metrics impacting the protocol's variable directional exposure risk and making parameter recommendations as needed to manage risk accordingly.
In order to mitigate directional exposure risk to LPs, Ostium employs a) the LB as a settlement layer of first-regard, and b) strategic fee structures to reward LPs for putting their funds at risk in service of protocol liquidity and help drive the protocol towards equilibrium by either closing the OI imbalance or charging higher fees in periods of high volatility.
Competitive Landscape
Perpetuals trading has been dominated in large part by centralized exchanges (CEXs), which can be explained by a lack of sufficient decentralized exchange infrastructure in the early stages of blockchain and crypto development (Uniswap V1 came out in 2018), as well as a lack of sufficient blockchain infrastructure to enable low fees and high performance. With both high performance Layer 1s (i.e Solana) and rollups (i.e. Arbitrum, Base) hosting increasingly greater amounts of onchain activity, blockchains are proving to be not only resilient, secure, ledgers for storing information, but also high-performance networks that can allow for near-instant settlement and transmission of information and value.
Ethereum dominance in perpetuals volume has significantly shrunk, indicating traders’ demand for high trading perps on high-performance chains, with a growing number of new L1s and L2s to meet this demand.
Ostium’s Edge
There are not many teams today building exchanges to facilitate trade of RWAs as perps onchain. As such, Ostium has an opportunity to gain first-mover advantage here and build a moat around its offering. That said, if Ostium open-sources its code, one could expect a number of forks to launch in addition to various protocols that can be built on top of Ostium. Forks are not a bad thing - sometimes imitation is indeed flattery, and a lot of forks can often be indicative of a good idea and strong core offering. That said, vampire attacks may be a cause for concern -a perps DEX may decide to offer similar markets to Ostium but with greater incentives for traders and LPs through inflationary token emissions (to this point - Ostium doesn’t have a token). However, Uniswap still dominates Sushiswap in most metrics today and Ostium will likely do the same if it moves and launches in a timely manner.
Ostium open-sourcing its code also raises some questions here - what can be built on top of an RWA perps exchange? Would these developments benefit Ostium and if so, how? Can Ostium gain enough momentum and adoption initially such that potential competitors would instead be more incentivized to build on top of or integrate Ostium rather than trying to build a competitive product more directly (i.e something similar to the Curve/Convex ecosystem)?
Protocol KPIs & Roadmap
Given that Ostium is currently in its public testnet stage, protocol data must be taken with a grain of salt as numbers can change with mainnet launch. That said, looking at the testnet leaderboard, the numbers for the latest competition look rather impressive;
15.9k total traders || 88.9k total trades || $13.54b in total volume
Looking ahead, there are several things we’re excited about at Shoal; for starters Ostium just recently completed its first smart contract audit with Zellic and is expected to release details of another audit with Three Sigma in the near future as well; mainnet launch is imminent and apparently 95% complete; it appears than an Ostium mobile app is in the works as well. Additionally, we pose several questions for the Ostium team below, which could serve as guiding frameworks for future research.
Questions for Ostium
Why build on Arbitrum / L2 versus an L1 like Solana, which is optimized for speed and performance that perps markets need?
Why build on Arbitrum in particular?
How do you imagine the MEV landscape within commodities markets? How might this differ from crypto markets (if at all)?
With its open source code, does Ostium envision any products or services that can be built on top of the exchange?
Closing Thoughts
The Case for Bringing Capital Markets Onchain
To reference Larry Fink’s grand vision of tokenization once more; imagine a globally accessible distributed ledger with hardcoded immutable evidence of who is buying, who is selling, who owns how many assets at any given time, with near-instantaneous settlement on top of everything. This scenario describes quite an egalitarian financial services industry, but it also speaks to what blockchains were ultimately built for - enabling transparency, immutability, and significantly faster settlement speeds relative to that of existing services and markets.
Meanwhile, Grayscale’s Zach Pandl argues that many types of assets, such as equities, are served relatively well by their current digital infrastructure, and that it is less than obvious that public blockchains will be superior solutions. Instead, he makes the case that the potential key benefit from tokenization is greater network effects. By implementing a common platform to host all assets across the globe, we can create a financial system with greater functionality, access, and lower costs than today’s existing solutions.
The Case for Ostium: Perps > Tokenization
Ostium believes that perps will ultimately frontrun tokenized RWAs as the primary means of onboarding non-crypto assets to be traded onchain. Perps are as popular and successful as they are in crypto largely because they “allow simple directional bets & abstract away the complexity of expiring futures and options.” Where tokenization suffers from operational management and regulatory hurdles, perps offer significant efficiency and go-to-market advantages. All that’s really needed to set up a perps market onchain is sufficient liquidity and a robust supporting data feed. This becomes especially easier for protocols whose pricing feed infrastructure is deeply integrated with existing tradfi data service providers. Unlike tokenization and its associated complexities (i.e. composable KYC-enforced token standards), perpetual contracts do not require the underlying asset to live onchain - traders are only trading derivatives contracts here. To set up a liquid perps market onchain, there’s no need for the underlying spot market to be onchain or integrated into crypto directly.
This isn’t to say tokenized markets won’t exist - everything will eventually settle onchain one day. Capital markets will likely gravitate towards blockchain networks for enforcement and verifiability, which would occur in two ways as eloquently described in An Unreal Primer; first by acknowledging RWA tokens as bearer assets in different jurisdictions, thereby enforcing owners’ legal protections and, second, by integrating collateral and other forms of lender protection directly into smart contracts to offer stronger assurances than that of existing legal systems.
The reality, however, is that it will indeed take a long time for every liquid public market to be issued and settled on a blockchain, as it will take a long time for the blockchain to become the ultimate ledger of record and source of truth for financial institutions. Until then, perpetuals ultimately provide the better choice for traders as they provide more flexibility, leverage, and fractionalization than spot markets. Looking ahead, Ostium is betting that perps become the default listing engine for RWAs and can support markets liquid and deep enough to incentivize participation from traders of all backgrounds and appetites.
One might argue that potential hindrance to the broader adoption of perps among retail investors is the perceived complexity of these financial instruments. As opposed to spot markets, perpetuals require accounting for a number of additional factors such as the relationship between collateral and leverage, how the funding rate works and how it affects PnL, the difference between underlying asset price and the price of the perpetual contract. That said, Robinhood made options fun and accessible to retail, which generated $154 million in revenue for them in Q1 2024 alone, and options are arguably more complex than perpetuals. Perpetuals have also been the single most successful product to be developed around crypto assets. So perhaps all we’re missing for trading virtually any asset onchain is a user-friendly perp DEX after all.
Where else can one bet on the price of hogs, soybeans, oil, forex, and more in one platform onchain?
References
Artemis Research. (n.d.). A history primer on tokenization. Retrieved from A History Primer on Tokenization: Why Assets Will Move to Public Blockchains
Centrifuge. (n.d.). Centrifuge. Retrieved from https://centrifuge.mirror.xyz/55xAwYhUBB9jHNFytS4u3jsG6HEkDzBljl253oEojBs?utm_source=interface.social
Chainlink. (n.d.). Real world assets (RWAs) explained. Chainlink Blog. Retrieved from https://blog.chain.link/real-world-assets-rwas-explained/
Deribit Insights. (n.d.). Perpetual swap funding. Retrieved from https://insights.deribit.com/education/perpetual-swap-funding/
Grayscale. (n.d.). Public blockchains and the tokenization revolution. Grayscale Research. Retrieved from https://www.grayscale.com/research/reports/public-blockchains-and-the-tokenization-revolution
Modern Treasury. (n.d.). History of ledgers. Retrieved from https://www.moderntreasury.com/journal/history-of-ledgers
Ostium Labs. (n.d.). Ostium Labs. Retrieved from https://ostium-labs.gitbook.io/ostium-docs
RWA.xyz. (n.d.). Tokenizing precious metals report. Retrieved from https://www.rwa.xyz/blog/tokenizing-precious-metals-report
Shiller, R. (1993). Measuring asset values for cash settlement in derivative markets: Hedonic repeated measures indices and perpetual futures. NBER Technical Working Papers, No 131. National Bureau of Economic Research, Inc.
SSRN. (n.d.). Measuring asset values for cash settlement in derivative markets. Retrieved from https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3353583
Uniswap. (n.d.). Electronification trading and crypto. Uniswap Blog. Retrieved from https://blog.uniswap.org/electronification-trading-and-crypto
Appendix
Defining Assets
As explained in An Unreal Primer on Real World Assets explains assets consist of two key elements: representation and ownership. Representation refers to various factors dealing with the economic aspects of an asset (value, expiration, physical condition), while ownership refers to the legitimacy of an asset’s title in a ledger. The bottom line here is that assets are valuable economic resources, but secure ownership of these assets is just as valuable, if not more, than the underlying asset itself. After all, if anyone can claim they own someone else’s asset and proper measures to refute this claim are not in place, just how valuable is this asset in the first place?
Important Considerations for Tokenization
Another important consideration to make on the topic of tokenization are token standards. Token standards are key to enabling composability in DeFi - there are no better examples for this than the success of the Ethereum DeFi ecosystem built around ERC-20 and ERC-721 tokens. The recently implemented ERC-4626 Tokenized Vault Standard enables yield-bearing assets which represent one’s share in an investment, like a liquidity pool, and accrue value directly. An issue arises when cross-chain transactions come into the picture: blockchains are siloed environments by nature which lack native mechanisms to interact with data outside its environment, even data from other blockchains. While protocols like the Cosmos IBC solve this problem for blockchains building on the Cosmos stack, they do not account for cross-domain transfers such as Cosmos <> Solana, Ethereum <> Solana. The good news is that a number of interoperability solutions are being created that ultimately solve this problem by using ‘alternative mechanisms’, such as lock-and-mint, mint-and-burn, as well as liquidity pool and intents-based protocols. However, this only solves for crypto-native assets and does not account for RWAs to be brought onchain. The point here is that a lack of a universal token standard creates a lack of composability and we can’t exactly “tokenize everything” without robust token standards in place first.
Currently with ERC-4626, the process for real-world assets requires the submission of orders and a corresponding waiting period for fulfillment to account for the coordination of investments, redemptions, asset originations, and asset repayments. Users deposit tokens into a pool and receive tokens representing their share until the request is completed later. This doesn’t reflect the near-instantaneous settlement and performance benefits blockchains can provide to existing infrastructure, which is one of the key pillars of the case for tokenization. Proposals like EIP-7540, which would be an extension of ERC-4626 with asynchronous deposit and redemption support, are one potential way to approach this issue.
However, for financial institutions, the ability to create and enforce a KYC (know-your-customer) standard is absolutely critical from a compliance perspective. Centrifuge, who has built a platform for tokenizing RWAs that is live and running since October 2020, describes what a token standard to link KYC information to a wallet can enable. Through this process, anyone can: verify onchain whether a wallet belongs to an individual or an entity, determine information about the person/entity, and can track who has approved this KYC information. With a KYC token standard, new possibilities are unlocked for composability and user experience; Centrifuge investments could be traded on secondary markets without the user needing to perform an additional KYC check. Looking more broadly: users could complete KYC once and interact with any permissioned protocol without additional onboarding steps. While this may sound like a nightmare for crypto-natives, consider that institutional adoption of blockchain and digital assets will not happen without mechanisms like this in place for legal and compliance reasons. Furthermore, a KYC-token standard will never become the de-facto standard for crypto assets at any point, even if it becomes widely adopted by financial institutions. We do strongly believe we will still be able to trade our magic internet coins anonymously if we wish to do so.
Below we raise some questions regarding tokenization inspired by Alex Weseley of Artemis Research and some of our personal theses for which teams and protocols are well-poised to benefit from tokenization;
How do different smart contract languages and infrastructure affect the implementation of tokenization?
Move, a language optimized for security, features stronger security features regarding asset ownership than Solidity and is custom-built for blockchains as opposed to Rust which is a general-purpose language. However, given the Move ecosystem is still nascent, necessary infrastructure and tooling for interoperability between Move <> other VMs such as EVM or SVM arise. For this reason,webelieve Movement Labs is currently the best poised to fill this need.
How will privacy compute solutions (ZKPs, FHE, TEEs) factor into the equation for financial institutions, for whom privacy and security quite frankly matter much more than the average onchain degen or retail investor?
What role will the nuances of different blockchain designs play? Will there be a winner-take-all outcome or will different blockchain designs serve different purposes and clients better? Furthermore - how will financial institutions approach developing their own public blockchain? What are the incentives to build an app-chain, L2, etc ?
With this in mind, interoperability solutions are set up to play a paramount role in facilitating an interconnected system (SWIFT enables banks to communicate globally). So who are the key players poised to benefit from this? Personally,webelieve this would be Chainlink CCIP, LayerZero, and Avalanche Teleporter, in large part due to their ongoing integrations with financial institutions and partners.
Intents-based bridge models like Across and Debridge cannot be discounted either here; the UX is significantly better and adoption of these protocols continues to grow slowly but steadily. If these protocols were to build solutions tailored for institutions we presumeinstitutionswepresume there would be a good deal of interest given their low costs and fast bridging speeds.
Zooming out further, we’d also like to add some interesting questions raised in “Electronification, Trading, and Crypto” with regards to the broader technological transformation implied by tokenization;
What does settlement look like in a world where it can be fine-tuned, so it no longer has to conform to market conventions around specific times or intervals? Is it possible to build primitives that let you choose settlement time, and what implications would such designs have on market functioning?
How might blockchains enable a move from price-time priority markets to markets based on fees and competition, and what might that mean for market structure and consumers?
How Perpetuals Work
To function, perpetuals need three key components - a market for matching buyers and sellers, a funding rate, and a spot index price.
A functional market to facilitate the matching of buyers and sellers is essential for the exchange of any asset, from commercial real estate to memecoins to perpetual contracts. This market must be liquid and efficient to ensure that trades can be executed promptly and at fair prices, which is often facilitated by the use of market makers who are responsible for buying and selling assets in a structured manner for the purpose of injecting liquidity and trading volume into markets. Lastly, a robust trading platform and interface is necessary for trading to take place on. It’s crucial that the interface be as intuitive and easy to navigate as possible for market participants to open and close positions with minimal friction.
The spot index price refers to an aggregated, real-time price that reflects the current market value of an asset, ensuring that the perpetual contract's price remains aligned with the actual market conditions. This provides a stable reference point for perpetual traders to rely on, by smoothing out any short-term anomalies or price discrepancies that might occur due to liquidity issues or disrupted price feeds.
The Funding Rate facilitates price discovery for perpetual contracts. Futures contracts have predefined expiry dates and though they can and often do trade at a discount or a premium to their underlying asset, contracts are settled using the underlying spot price of the asset, thereby converging this margin to zero as the contract approaches its expiry.
Conversely, perpetuals lack an expiry and therefore require an ongoing payment mechanism (settled every 8 hours) in which the counterparties pay one another depending on market conditions at a given time, known as the funding rate. When the funding rate is positive, that is, when the price of the perpetual swap is higher than the index, longs pay shorts. When the funding rate is negative, wherein the price of the perpetual swap is lower than the index price, shorts pay longs. Ultimately, settlement is based on the difference between the perpetual swap price and that of the underlying asset, as well as the difference in leverage between the two sides if leverage is used. This mechanism is designed to balance market demand by ultimately encouraging the price of the perpetual to shift back towards the index price.
Similar to options and other derivatives contracts, perpetuals allow investors to speculate on the future price movement of an asset without having to own the underlying asset itself. This allows for anyone to open a position in a perpetual contract with leverage, meaning they can access and trade a larger amount of capital than the collateral (margin) to be posted on their account. For a short summary on leverage ratios: Leverage 2:1 = 50% collateral to be posted, Leverage 5:1 = 20% collateral to be posted, Leverage 10:1 = 10% collateral to be posted, and so on. This unlocks capital efficiency thereby allowing for a greater number of potential market participants, as one can now trade $1000 worth of BTC with just a few hundred dollars. Of course, it's important to note that leverage is two-fold and just as traders can access more capital with less upfront costs, the risks associated with doing so can often reverberate much stronger than buying and holding in spot markets.
Not financial or tax advice. The purpose of this newsletter is purely educational and should not be considered as investment advice, legal advice, a request to buy or sell any assets, or a suggestion to make any financial decisions. It is not a substitute for tax advice. Please consult with your accountant and conduct your own research.
Disclosures. All posts are the author's own, not the views of their employer. This post has been sponsored by Ostium. While Shoal Research has received funding for this initiative, sponsors do not influence the analytical content. At Shoal Research, we aim to ensure all content is objective and independent. Our internal review processes uphold the highest standards of integrity, and all potential conflicts of interest are disclosed and rigorously managed to maintain the credibility and impartiality of our research.