Users of centralized exchanges are required to provide proof of solvency, and the claim that "the exchange is regulated" is not enough to meet their requirements. Existing methods like reserve proof based on third-party audits have weaknesses (they are not updated daily and can be manipulated). Centralized exchanges running on Ethereum using StarkEx Validity Rollup can enjoy all the benefits:
- Exchanges can be regulated and comply with relevant jurisdictional regulations.
- Each validity proof has a reserve proof (approximately twice a day!).
- Users can choose to self-custody but still actively trade.
- If the exchange operator shuts down, users can withdraw funds through Ethereum.
- Exchanges cannot exempt any individual trader from liquidation - everyone must follow the same rules.
Introduction
FTX was originally a fully regulated exchange with a 1:1 asset storage ratio. But they betrayed us and deceived us.
Therefore, users want more transparency. They want a method that can verify that the exchange indeed has enough assets to fulfill its debts without the need for trust. They don't trust regulation, they trust code. Additionally, many users want to self-custody while still being able to trade.
Weaknesses of reserve proof
How does reserve proof work? Typically, every quarter, external auditors are given access to the exchange's books. They verify if the wallets controlled by the exchange have enough assets to cover users' debts. Then, the auditors maintain a Merkle tree where each leaf contains the balance of a user's specific asset. Users can verify their balances in this tree based on the information provided by the auditors. Kraken has been doing well in this regard for years. See their reserve proof page.
The problem is that reserve proof provides end users with a false sense of security. Why?
Reserve proof is not updated daily.
Exchanges take a snapshot once a quarter, and auditors need weeks to prepare everything. During this period, the industry may experience contagion events that could put significant pressure on the exchange.
Exchanges can collude with auditors.
Although auditors may want to protect their long-term reputation and avoid illegal activities, the simple fact is that they can still be bribed to lie. FTX claims to be regulated by GAAP audits, look what happened.
Exchanges can borrow assets before the snapshot.
Exchanges can manipulate audits by borrowing assets from counterparties. They can exclude these loans from the books and claim to have transferred funds to the auditors to deceive them. This is a real risk.
Exchanges must sign cold wallets to prove ownership.
Exchanges often claim to have cold wallets isolated from the internet. These wallets have strict control measures to prevent hacking attacks. If quarterly confirmation is required, these wallets need to be signed every quarter. This introduces operational risks for the exchange.
StarkEx solves all the problems
Besides reserve proof, there is a better alternative. There is an architecture that can not only prove that the exchange has enough assets to fulfill users' debts but also prevent the exchange from outright stealing users' funds without the need for trust.
Before continuing, please make sure to read Vitalik's article, especially the section titled "Plasma and validiums: can we make CEXes non-custodial?"
StarkEx architecture
Using the StarkEx architecture (see the diagram above), centralized exchanges can still operate most parts of their system in the same way as they do currently. They will still have the same user registration process that happens today. Depending on their jurisdiction, they will have the same KYC/AML requirements as the exchange currently follows. Additionally, the order book and matching engine will remain centralized. This is important because it ensures liquidity providers can provide real-time pricing, just like they are used to in the traditional financial world. On-chain order introduces block time and network synchronization delays that hinder traditional market makers from providing liquidity.
The only difference is that actual trades will be sent to the StarkEx service (REST API) and settled on Ethereum through STARK proofs. There is a lot to explain here, so let's look at the entire process.
I have $1200 USDC and want to exchange it for 1 ETH. I sign an order authorizing this trade with my private key.
The exchange matches me with another party and atomically exchanges the assets between us.
Then, a STARK validity proof is generated, proving the new state of the network where my ETH balance increased by 1 and my USDC balance decreased by $1200.
Then, the smart contract on Ethereum automatically verifies this proof. This verification proves the new state, and now my private key controls 1 ETH.
Profit!
The example above is for spot trading. For perpetual contracts, the process is similar, except now the proof confirms my position instead of my balance. In fact, let me explain in more detail what happens if I have a position on a perpetual derivatives exchange (like dYdX) that has now been liquidated.
I have $100 USDC on dYdX.
I trade with 10x leverage, taking a $1000 ETH position.
Then, the ETH price drops by 10%, and I get liquidated.
Then, the StarkEx API receives an Oracle price update confirming the price drop and cryptographically proves that my liquidation followed all the rules of the system. Then, the exchange liquidates my position.
If my funds are stuck in the StarkEx instance and I want to withdraw them, I can submit a transaction on the StarkEx instance, wait for the proof to reach the chain, and release my funds. However, things get even cooler. If the exchange operator chooses to act maliciously or shuts down, the exchange cannot steal users' funds. In this case, users can trustlessly go to Ethereum Layer 1 and submit a withdrawal request there. If the StarkEx instance doesn't process the withdrawal request in a sufficient amount of time, the funds will be released on Ethereum. See the StarkEx documentation.
This may sound trivial, but it is profound. Users get the same user experience as trading on traditional exchanges while enjoying additional benefits:
Users can choose to self-custody but still actively trade.
If the exchange operator shuts down, users can withdraw funds through Ethereum.
Exchanges cannot exempt any individual trader from liquidation - everyone must follow the same rules. Remember what happened with Alameda? It exposed the case of Alameda getting special rules on FTX (no automatic liquidation). This is impossible on StarkEx - provers will never prove a state that has a position exceeding the margin requirement.
A little tip about data availability modes
In addition to the proofs sent to the chain, Ethereum needs to know what the new state is. This can be achieved by either sending the entire Merkle tree to the chain (Rollup mode) or by storing the Merkle tree in a data availability committee and only storing the root of the tree on-chain. For more information and trade-offs, see this article.
This is not hypothetical; it has already been achieved at scale today
We have 8 teams running on StarkEx in production today. Check out the "Customers" section here: https://starkware.co/starkex/
Let's take dYdX as a real-world case study.
They have processed over $750 billion in cumulative trading volume, all supported by StarkEx.
Their trading volume increased when the FTX story came out!
Asset verification can happen on-chain, and every proof is updated.
dYdX uses Rollup mode for data availability, so they don't even need a data availability committee to release their funds.
Users have full control of the private keys to their funds.
What about real-world assets?
Many people believe this solution has powerful potential for Ethereum-native assets but are unsure how it scales to tokenized real-world assets. For this, let's refer to Vitalik's viewpoint.
The last question is: Can you do asset verification for fiat currencies? Exchanges hold not only cryptocurrencies but also fiat currencies within the banking system. For this point, the answer is: yes, but such a procedure will inevitably rely on a "fiat" trust model: the bank itself can prove the balance, auditors can prove the balance sheet, etc. Given that fiat currencies do not possess cryptographic verifiability, this is the best that can be done within this framework, but it is still worth doing.
There is a trust point in this tokenization, but that's it. The exchange can still operate as described above.
Conclusion
This is the future of finance, solving real problems encountered in traditional systems. Our vision is that within the next decade, StarkEx will power the trading and settlement of all financial instruments.