How MicroPerps Work

On YouCoin, every spot market starts with a perp with 3x leverage, scaling to 100x as the market matures. This is all thanks to a new innovation we’ve developed that we call the Micro Perpetual, or MicroPerp for short.

MicroPerps allow us to go from perps on hundreds of assets maintained by gatekeepers to perps on millions of assets maintained by no one, permissionless in the original sense of the word.

Today, exchanges like Binance and Hyperliquid can only list perpetuals for a few hundred out of the millions of assets that exist on-chain and in the real world. Even after listing an asset, if its liquidity subsequently deteriorates, they have to delist it. But why is this the case, and could we question their assumptions to engineer a truly permissionless perps venue? After all, isn’t the point of DeFi that we don’t have gatekeepers telling us what we can and can’t trade?

Truly Permissionless Listing

MicroPerps can extend the magic of leverage and shorting to the long tail of assets by taking the exchange out of the listing decision.

The core reason existing perpetuals exchanges have to be conservative about what they list is that when a trader’s position goes negative, the exchange is the first line of defense to take over that bad debt. On Binance this manifests as an insurance fund, and on Hyperliquid it’s their HLP vault, but in either case the exchange takes a beating if they list an illiquid asset that results in a cascade of insolvency. The reason for this is largely historical: exchanges have had a means of socializing losses for some time via so-called “automated deleveraging” (ADL), but this has traditionally been used as a last line of defense, and virtually never as the sole means of settling bad debt.

YouCoin starts by questioning this assumption: what would a system look like that solely relied on ADL, without putting the exchange on the hook for bad debt at all? The result is unintuitive because initially it seems like you’re worsening the experience. After all, isn’t it strictly better for the user if the exchange tries to cover bad debt before socializing losses? But if you pull on this thread all the way, and invest in completely re-architecting the risk engine from the ground up, what you get is an exchange where perp markets can be initialized on any asset, no matter how early or illiquid, with virtually no impact to the trading experience. The end result is an exchange where millions of perps can trade, rather than just a few hundred.

MicroPerps can extend the magic of leverage and shorting to the long tail of assets, in much the same way bonding curves greatly expanded the market for small-cap spot assets. Of course, the most illiquid ones will be quite risky to trade, but for the first time that will be up to the market to decide rather than centralized gatekeepers.

Mathematically-Guaranteed Solvency

Taking the exchange out of the listing decision means first taking the exchange off the hook for bad debt. The best way to do that is to ensure bad debt can never exist in the first place.

In order for a perps exchange to function without someone whitelisting markets, it must be the case that there is no bad debt lurking in any market at any given time. That is, each market is mathematically guaranteed to be “solvent” immediately after every state transition. This is a major break from how centralized exchanges treat risk, as they often allow insolvencies to persist while they liquidate assets or let the risk engine catch up.

YouCoin achieves this by running solvency checks before every single trade and every single price tick, and running ADL atomically within the transaction itself if anyone has gone negative. Whereas exchanges typically have dedicated risk engines that run as a separate process from matching, YouCoin bakes the risk engine and matching engine into a single monolithic core that runs atomically on every transaction. This is the only way that solvency can be guaranteed atomically upon each operation, without requiring an exchange’s capital to act as a backstop.

With the matching and risk engines consolidated into a single thread, you might wonder how we achieve scale. Even if a single thread can achieve over 300k steady-state transactions per second, as it can in YouCoin’s implementation, we still need to be able to shard markets across threads in order to reach our goal of hosting millions of markets. This is achieved by keeping all markets in isolated margin by default. When two markets are isolated, and when ADL is run as described above on every transaction, we can shard markets and still be assured that the system as a whole is solvent as long as each individual market is solvent before and after every transaction.

Keeping all markets in isolated margin to start is also desirable because it prevents liquidations in one market from impacting others. As markets mature, including them in cross or portfolio margin is a simple flag-flip. In this case, however, discretion is required because including a highly-illiquid market in cross or portfolio margin could cause losses to participants in the other markets in the set.

Sparse Event-Driven Ticks

Until now, virtually all perp exchanges have operated on time-based price and funding rate ticks, under the assumption that they’ll only ever have to support a few hundred markets. For example, on a traditional perps exchange, a price tick typically occurs on an interval every three seconds to trigger PnL updates and liquidations. However, this breaks down when the number of assets grows large and the liquidity on a majority of the assets is low. What do we do if someone creates an asset and its trades start to occur only once an hour, or even less frequently? A traditional perps exchange would simply de-list this asset, but we can do much better. We not only want to do the right thing in all such cases, but we also want to avoid such assets dragging down performance. If you’re only listing a few hundred assets then time-based ticking is fine. But once you scale to millions, you have to rebuild everything from the ground up to be event-based.

Price Ticks

MicroPerps can function on any price feed, but they are especially powerful when attached to spot YouCoins. This is because the platform is in a privileged position as both the genesis point for spot YouCoins and initially the sole perp venue for them as well.

For YouCoins, the spot price is the sole input to the mark price oracle used to compute PnL and liquidations on each corresponding perp market. Regardless of where price ticks come from, the spot mark is always computed as a simple three-minute exponentially-weighted moving average of the bonding-curve price:

The EMA time constant is three minutes but this does not mean ticks occur every three minutes. For hot markets, ticks are rate-limited to at most once every three seconds. For quiet markets, no tick is emitted until a relevant event occurs, at which point the mark is lazily advanced over the full elapsed interval.

For those interested, the update rule on each event uses advance-then-record semantics, which specifically treats “no update” as “the price stayed the same.” Let:

  • be the stored spot mark after the previous materialized update.
  • be the last stored bonding-curve price.
  • be the timestamp of the previous materialized update.
  • be the EMA time constant.

When a new spot trade arrives at time , the system first advances the mark over the elapsed interval using the previously stored bonding-curve price:

This advanced mark, , is the mark used for any risk checks, liquidations, or ADL triggered by elapsed time. Only after this advancement does the new trade update the bonding-curve price. If the post-trade bonding-curve price is , the system stores:

In other words, the post-trade bonding-curve price does not affect the mark instantaneously. It becomes the input toward which the mark integrates during the next interval. This means that “no update” is treated as “the previously observed bonding-curve price remained constant.” Quiet markets do not emit periodic ticks, but whenever a relevant event occurs, the mark is lazily advanced over the full elapsed interval before the event’s new price is recorded.

While most perps exchanges use a formula like this to compute mark price, where YouCoin diverges is that ticks do not happen on a fixed three-second schedule. Instead, a tick is emitted only on a trade, and only if three seconds have elapsed since the last tick. This means:

  • Quiet markets don’t waste compute on idle ticks, and a market with no trading activity doesn’t generate any updates at all.
  • Active markets can’t generate updates faster than once every three seconds, bounding the worst-case load from any single hot market.
  • The mark price still evolves smoothly between updates. Even when no trade has fired, the stored mark continues to drift toward the last-known spot price over time, so a position can never get “stuck” at a stale mark just because trading paused.

This event-driven update works no matter what the source of the oracle information is. The source can be the spot price of a particular YouCoin, a Bitcoin price, an equity price, or even some arbitrary numerical timeseries like weather data. All of them work just fine under this model.

Critically, every time a price tick fires, liquidations trigger as necessary, thus guaranteeing solvency on every price change. If a price tick would put someone underwater, that is handled atomically in the price tick update.

Funding Ticks & Settlement

The funding rate on perpetuals is what ensures that perp market prices stay in-line with their corresponding spot prices. In order to scale to millions of markets, however, MicroPerp funding ticks and funding settlements both need to be redesigned to be fully event-driven, a significant divergence from traditional architectures. In addition, to properly incentivize shorts on early markets, an additional adjustment to funding needs to occur that automatically scales down as the liquidity matures. We will discuss all of this in this section.

The funding rate for MicroPerps has two components. The first is a premium component, computed as a ten-minute exponentially-weighted moving average of . perp_mid is itself a three-minute exponentially-weighted moving average of the perp order-book mid price, computed sparsely like we do for spot_mark.

Like the spot mark, perp_mid is treated as having stayed the same over any interval where no update fires. perp_mid updates on order placements and cancellations in addition to trades. The spot mark on YouCoins only updates on trades because the bonding curve is its sole source of new prices.

The full computation of the premium looks as follows:

  • Importantly, an update only occurs if an event occurred, in this case a trade, order placement, or order cancellation. This makes it so quiet markets exert zero cost on our system.
  • If the perp order-book does not have a valid mid (e.g. because one or both sides of the book are missing), it is treated as undefined, as we’ll discuss below.

With perp_mid defined, we can write the premium component:

The funding rate is settled hourly, and the ten-minute EMA smooths the input so each hourly settlement reflects aggregate conditions over the prior period.

  • Again this is computed on an event-driven basis. If there are no updates to perp_mid or spot_mark then the premium component remains constant.
  • If perp_mid is undefined then we treat premium_component as zero. Note spot_mark cannot be undefined for YouCoins because the bonding curve always offers a price.

In addition to the premium component, the funding rate for MicroPerps includes a base_rate component specifically to incentivize liquidity early on. MicroPerps start as relatively illiquid assets, and the perp order-book may start with no resting liquidity on it at all, and thus no good way to compute the premium mentioned above. When this is the case, we default to a prior that heavily incentivizes short liquidity (and thus resting asks) to get the market started. The base_rate is designed to start high when there is no liquidity on the book, and scale down as liquidity increases. When a market is fully mature, it goes to zero. All funding rates and rate constants in this section are quoted per hour.

  • If perp_mid is undefined, then ask_liq_score is 1.0.
  • ask_liq_score is recomputed at most every three seconds on an event-driven basis, smoothed with the same three-minute EMA as spot_mark.
  • max_base_rate is the per-hour rate paid to short positions if ask_liq_score is 1.0.

Why incentivize shorts rather than longs? For small-cap tokens, and indeed most tokens in general, long demand is generally organic and outweighs short demand. In normal circumstances, the premium_component would fully capture this discrepancy and correct the imbalance accordingly. However, the base_rate essentially provides a correction for when markets either don’t have a defined perp_mid (which is the initial state) and/or when that perp_mid is highly sensitive.

Putting it all together, the full funding rate is computed as:

  • An update to the funding rate occurs when a relevant event (trade, order placement/cancellation) happens to cross an hour boundary. When this occurs, the funding rate is updated and all funding payments are settled. If there are no ticks at all over an interval then funding_rate is presumed to remain the same over that interval, which means users continue to be charged/paid at the prior funding rate.
  • Importantly, the funding rate is not updated on every event. Rather, we track a funding_index equal to the cumulative quote funding per 1 token of position. We then update this according to the above rules, and use it to settle funding for users. All we need to keep globally is funding_index for each market, and account_last_funding_index for each user's position, in order to process these payments.

Note that great care must be taken to keep all of this efficient, and to keep everything bounded as O(events) rather than O(number of markets + events). We do not go into all the details here, but hopefully the above gives an idea of the change in architecture required to enable perps on millions of markets.

Max Leverage on MicroPerps

YouCoin MicroPerps start initially with 3x leverage the moment a spot market is created. As the market matures, leverage increases according to a combination of volume and depth, eventually reaching 100x leverage once the market has fully matured.

We do not share the exact graduation criteria here, but we note that in the limit as a MicroPerp’s volume and depth continue to increase, it essentially becomes a normal perp with high leverage as well as a standard mark and funding rate.

Bootstrapping a MicroPerp Market

MicroPerps bootstrap largely like traditional perps do, with minimal adjustment for users and virtually no change in the UX. The steps are as follows:

  • As soon as a YouCoin spot market is launched, the perp market is simultaneously launched alongside it. YouCoin spot markets trade on bonding curves, which supply a consistent spot_mark for all markets at all times.
  • Initially, the perp market will allow 3x leverage but will have no orders in it. At this point the funding rate will be high at max_base_rate, strongly incentivizing short liquidity to get things started.
  • As the market matures, the funding rate stabilizes at more reasonable levels and the amount of leverage allowed on the perp market organically increases over time.
  • Whenever insolvencies occur, whether early on or otherwise, the system’s advanced ADL system neutralizes them atomically, within the transaction that caused them, mathematically guaranteeing solvency after every event.
  • If the market never matures or stops being active, any active perp positions continue to exist, paying the funding rate determined at the last tick. The exchange can tolerate millions of inactive perp markets with virtually no cost to the system.

The above seems simple, and yet it enables perps on highly-illiquid markets for the first time, and can scale to a platform with millions of perps listed instead of hundreds.

Other Applications

We mentioned how MicroPerps can enable leverage and shorting on any numerical price feed, without relying on a gatekeeper to whitelist markets. Below we flesh out some of the applications concretely and how they will work:

  • A mirror of the stock market. This is the most obvious application. Every equity with a price can simply have a mirrored MicroPerp on YouCoin. Critically, the fact that they don’t trade at night or on the weekends is no problem given the MicroPerp’s tick-based architecture. Users would not have to wait for listing either. Pre-IPO markets work just the same, with their first tick happening whenever the market opens. Funding would initially start by incentivizing shorts according to the base_rate, and then normalize to zero as liquidity built up ahead of the stock going public and opening for trading (after which the premium component would keep the MicroPerp in lock-step with the stock price).
  • A mirror of the commodities market. No different than the stock market above. Any commodity can automatically have a MicroPerp, regardless of how frequently or how reliably it ticks.
  • Prediction markets with leverage. MicroPerps uniquely unlock the ability to add leverage to prediction markets. There is no reason why every prediction market on PolyMarket can’t have a mirrored MicroPerp on YouCoin for those who want to amplify their returns.
  • Real-estate speculation. Imagine if you could long and short every home on Zillow, with leverage. Real estate prices are less liquid than traditional equities and commodities, but that’s not a problem for MicroPerps. Every listing on Zillow can attach to a unique MicroPerp on YouCoin in much the same way we’ve mapped social profiles to YouCoins today.

These are just some examples of what’s possible with the technology we’ve developed.

You might wonder: If these applications are available to us then why are we starting with coins attached to social entities? The answer is these memecoin-like assets are originated by the exchange itself, which makes them a better testing ground for MicroPerps, allowing us to work out the kinks with a self-contained system. After proving the model, however, you can expect “YouCoin for stocks,” “YouCoin for commodities,” “YouCoin for events,” “YouCoin for real-estate,” etc... If there’s something people want to trade, there will be a MicroPerp for it on YouCoin.