StarkEx 2.0 is Now Live on Mainnet!

The first Cairo based system is now in production

StarkWare
StarkWare
Published in
3 min readDec 2, 2020

--

Five months ago we launched StarkEx 1.0, the first production-grade STARK system, powering DeversiFi’s self-custodial exchange. Immediately after launch we started developing the new and improved version, StarkEx 2.0, which rolled out today. This version introduces a number of significant improvements in different aspects of the system.

Read the docs

Cairo: One Verifier to Rule them All — StarkEx 2.0 is the first system in production to be programmed in Cairo, our new Turing-complete, programming language for generating STARK proofs. The soon to be launched exchanges of our partners, ImmutableX and dYdX will also be powered by Cairo. You can learn more about Cairo in this post, or from this talk.

Scalability through Universality — Moving from hand-written constraints to the universal Cairo framework may be viewed as trading the efficiency of an ASIC with the safety of a programming language. But in fact, having an agile and expressive language allows us to write more efficient code for checking complicated and costly computations, and by doing so improve scalability. One such example is creating smaller proofs by checking a Merkle sub-tree, as opposed to checking many individual Merkle paths.

The result? a 4x increase in batch size for DeversiFi and of course our demo of 300,000 Reddit transactions in a single proof.

Fast L1-L2 Connectivity — Last year we were the first to suggest mechanisms for harnessing the guarantees of L2 validity proofs to allow speedy L1 transactions ahead of syncing with L2 state. Now, this innovative feature is live, and will allow StarkEx users to invoke Fast Withdrawals as well as other L2-L1 interactions, at blockchain speed. DeversiFi is already planning exciting new features using this capability, and we look forward to seeing the innovation this will unleash.

ERC-721 Support — StarkEx 2.0 is now ready to support trading (and soon, massive off-chain minting) of non-fungible tokens (NFTs) adhering to the ERC-721 format. This capability is crucial for the imminent launch of ImmutableX, but will also serve future StarkEx customers who may wish to combine trading of fungible tokens and non-fungible gaming and collectible items.

Flexibility — We improved contract interfaces across the board — users can now deposit to any L2 account and withdraw to any L1 address. E.g., Bob can deposit directly to Alice’s L2 account. Alice can withdraw her funds directly to her cold wallet Ethereum address, or send her funds to Bob’s Ethereum address.

Improved Onboarding for Users — Users can now be registered to StarkEx by any address (i.e., by the Operator itself), allowing the application to remove the registration step from the user onboarding process, and register users directly to L2. Less friction, better conversion.

Smart Contract Key Recovery — Each Ethereum address can now have multiple L2 accounts. This allows smart contract wallets to recover their keys. This also allows traders to keep their funds in different accounts off-chain.

Ensuring Self-Custody — Last but not least, this upgrade was the first demonstration of StarkEx’s upgrade mechanism on Mainnet. This upgrade was proposed on-chain 28 days ago:

We designed our upgrade mechanism to ensure users’ self-custody. Instead of allowing the system operator to do arbitrary changes to a StarkEx contract, a new version of the contract is first proposed and can only be activated after 28 days have passed. This period allows any user of the system to audit the changes, and leave the system if they choose to.

You can find more details on the upgrade mechanism here.

StarkEx — The Road ahead

Now that StarkEx 2.0 is out, we’re working on upcoming versions, the first of which should be deployed by the end of this year, and power ImmutableX. Shortly after, the StarkEx system supporting the dYdX perpetual contracts exchange will go live. Each of these versions will include additional innovative first-time features — stay tuned!

Tom Brand

--

--

StarkWare
StarkWare

STARK-Based Scaling Solutions