Elastic Circuit Breakers
On Black Thursday, we saw multiple oracle and settlement platform failures that were tied to network congestion and spikes in transaction fees and prices. A lot of folks on Twitter have suggested that we need global circuit breakers for crypto trading. While we cannot confirm this, it appears that BitMEX instituted a circuit breaker — by just unilaterally shutting down the exchange without warning — to prevent BTC from cascading down to $0.
I think we can do much better than the status quo — CEXs — and build elastic circuit breakers that can dynamically adjust when volatility is high.
How do we build an elastic circuit breaker in a decentralized way? By default, orders are executed within the same block that they are matched. What if we allowed orders a fixed period of time measured in the number of blocks to cancel after they have been matched? Let’s call this value T, and under normal operation, T can be set to 0. During times of high volatility, instead of completely halting the marketplace, the underlying marketplace contract can dynamically increase T. This would give both traders and oracles more time to cancel their orders until the volatility subsides. During the extended period T, additional orders, cancels, price changes and oracle prices are allowed to enter the marketplace, and as long as one block producer is honest, a trader can adjust her order before it is executed and maintain a spread that is appropriate for the current volatility. Eventually, panic subsides, spreads tighten, volatility decreases, and T can automatically readjust to normal levels.
Should T be adjusted by an oracle, or programmatically from market place activity? This paper by Philip Daian does a great job of describing the problem of ‘Miner arbitrage’, https://arxiv.org/abs/1904.05234, and this problem applies to oracles as well. Inherently, the people who control which transactions go in each block (validators) will have undue influence on such a system.
If T is derived programmatically, we have a bit more control over how the market behaves even if the miners are dishonest. Assume T is calculated from the current volatility over a short period of time. We can start with T = 0 blocks. Most orders should execute when matched, and cancellation is not allowed. This works fine if most trades execute close to the spread. When an order is placed mid spread, a miner sees an opportunity and purchases the order in the same block and injects another order that buys the same asset in the same block. This allows the miner to make a small profit because all of the trades are occurring within the spread and executing in the same block. There is nothing particularly wrong with this since the miner is effectively acting as a market maker.
So, how does Solana help? We have a low-latency, high-capacity, and single-shard replicated state machine. We can help with the oracle and marketplace problem by offering more block producers per second, more traders per second, and more price feeds per second.
If a taker buys or sells deep into the order book, volatility is calculated for that market, and T increases to N blocks. Since the orders are not executed for N blocks after they are matched, anyone trying to use flash loans to secure that trade cannot be repaid in the same transaction, and those orders fail. During a panic, information flows to traders, block producers, and oracles at different times; if an order clears the entire order book, the market makers have a chance to cancel their positions and widen spreads.
This elastic circuit breaker idea is only viable in low-latency, high throughput environments.
So, how does Solana help? We have a low-latency, high-capacity, and single-shard replicated state machine. We can help with the oracle and marketplace problem by offering more block producers per second, more traders per second, and more price feeds per second. If you design your marketplace such that it behaves fairly and if at least one honest block producer participated in time T, then our performance can help maximize the odds of an honest block producer participating in the market. To give you some concrete numbers, Ethereum blocks are produced every 15 seconds, and we have 400 ms blocks, with block producers rotating every four slots (1600ms). Solana rotates through nine-block producers in the same amount of time of a single Ethereum block. If only 33% of Solana validators are honest, the likelihood of an honest producer is 98.7% within the same time frame of a single Ethereum block.
Pre-bidding is now live for our Coinlist auction. The actual auction will take place on March 23rd at 10pm PT.