0
0
Article

How to use StarkWare Layer 2s

StarkWare is pushing the limits of scalability with its L2s...try for yourself!
0
0
Jan 11, 20228 min read

Dear Bankless Nation,

#L222

This year will be the year that Layer 2 solutions take off 🚀

In our Bankless 2022 Predictions post, I wrote:

At least two Layer 2 tokens will enter the top 10 cryptoassets by marketcap (#L222). Active addresses and transactions of at least three Layer 2 networks will exceed L1 Ethereum (great migration). At least two new token launches for Layer 2s (L2 drops)

Why am I so bullish on L2s? Because in 2021, we laid the groundwork for this technology to take off. Let’s summarize:

There’s been a lot of criticism of Ethereum as gas fees climbed last year—I understand why! But user transactions were never destined to stay on L1s.

The industry is gearing up for a massive UX improvement across the board as L2 development and adoption continue to reach new heights in 2022.

Last week, William spotlighted zkSync. Today, he’s going deep on StarkWare.

By the end of this post, you’ll have four dapps to play around with. And, if you’re daring, there are also a slew of ways to experiment with the StarkNet Alpha.

Get at it 💪

- RSA


StarkWare is in the process of developing not one but two extremely promising scaling solutions, which are StarkEx and StarkNet.

This Bankless tactic will highlight how to create and fund layer-two (L2) accounts on four dApps that are powered by StarkEx, as well as a handful of ways to test out the StarkNet Alpha!

  • Goal: Learn how to use StarkEx and StarkNet apps
  • Skill: Intermediate
  • Effort: Varies
  • ROI: Building out your crypto skill tree in L2 ‘22!

Welcome to StarkWare’s L2s

Zero-knowledge proofs are an incredible innovation that, through the use of cryptography, lets a system prove a piece of information is correct without having to reveal further details about that info.

These cryptographic proofs are leading to breakthroughs around a range of applications, not least among these being the scaling of Ethereum dapps. This style of scaling, which like others makes Ethereum-based transactions very fast and very inexpensive, has given rise to what we call zero-knowledge rollups, or zkRollups.

These rollups serve as off-chain execution layers for Ethereum, hence their L2 moniker. They specifically use zero-knowledge proofs to group many transactions together and efficiently post the batches to Ethereum.

Two teams doing some of the most impressive work around zkRollups right now are Matter Labs and StarkWare. Bankless guest writer Alex Beckett recently wrote a great comparison of the teams’ technologies, and last week’s tactic covered how to use Matter Labs’s zkSync L2.

For this week, we’ll complete the arc by exploring the early frontiers around StarkWare’s StarkEx and StarkNet L2s.

The StarkWare 101

StarkWare is a team focused on building Ethereum scaling solutions. The first L2 the builders created was StarkEx.

What is StarkEx?

StarkEx is a scalability engine released in 2020 that now supports $1B in total value locked. The solution currently offers two modes, a zkRollup mode, and a validium mode.

For example, decentralized derivatives platform dYdX is an example of a dapp that relies on StarkEx’s zkRollup L2. The advantage of this approach is that dYdX’s users can enjoy fast and cheap transactions in a trustless fashion.

Additionally, StarkEx offers a validium mode. Validiums use zero-knowledge proofs and execute transactions off-chain like zkRollups, but they manage data off-chain whereas zkRollups manage on-chain. This L2 model compromises on security some by introducing elements of trust but provides advanced scalability possibilities.

Today, StarkEx validiums are custom-tailored for the dapps that use them. For instance, the projects with the first bespoke StarkEx validiums are DeversiFi, ImmutableX, and Sorare. In the future, StarkEx will employ a third volition mode that will let users decide on the fly whether they want to opt for a zkRollup or validium experience.

What is StarkNet?

StarkWare is also hard at work in developing another L2, StarkNet.

In short, StarkNet is a decentralized and permissionless zkRollup that will provide compatibility with the Ethereum Virtual Machine (EVM) via a compiler to its native programming language, Cairo.

What this means is that StarkNet is designed for general-purpose computation. This will allow people and projects to port over Ethereum code through a Solidity-to-Cairo compiler or to natively create dapps in Cairo instead of developing custom L2 infra, e.g. a bespoke validium deployment.

In November 2021, the StarkNet Alpha launched on the Ethereum mainnet. This is an early, experimental phase for the scaling solution in which it very much still has training wheels on, so to speak. Future versions of StarkNet will do away with the alpha’s network state, so things are still really early for this L2.

That said, StarkWare’s positioning StarkNet to be a scaling solution to be reckoned with for years to come, so it’s an interesting time to test and get a feel for the tech.

Notably, like StarkEx we’ll see StarkNet eventually employ a volition mode through which people can opt for on-chain or off-chain L2 data management.


How to use StarkEx

1) dYdX

dYdX is a decentralized derivatives platform that specializes in perpetual contracts. The dapp’s StarkEx-based zkRollup deployment is currently the second-largest L2 per TVL (behind only Arbitrum right now) according to L2BEAT.

To trade on dYdX, you first have to fund your L2 Perpetual account. You can do so by following these steps:

  • Connect your wallet on dYdX, go to the Trade page, and press the “Recover keys” option.
  • You’ll sign 2 transactions with your wallet, and after this you’ll be onboarded to the exchange’s zkRollup.
  • dYdX’s margin/settlement currency is USDC, so you can deposit USDC or other ERC-20s that will be converted to USDC via 0x. Click on the “Deposit” button on either the Portfolio or Trade page to proceed.
  • Here, you’ll need to approve dYdX to spend your USDC. Complete the approval transaction with your wallet.
  • Next input the size of your deposit, press “Confirm Deposit,” and complete the ensuing transaction. It’ll take 10 Ethereum network confirmations for your money to appear in your account, and then boom! Your L2 account will be funded and you can start trading.
  • Note: dYdX’s perpetuals aren’t offered to users from the U.S. and certain other countries. Also, be sure to mind your STARK key.

If you’re interested in learning more, we’ve published a full guide on how to trade on dYdX on Layer 2!

2) ImmutableX

ImmutableX is the first NFT-focused validium built through StarkEx. The NFT market scaling solution is currently the 8th-largest L2 and the largest Validium per TVL according to L2BEAT.

Notably, the NFT infra is home to collections like TikTok Top Moments, Gods Unchained, Guild of Guardians, and more.

If you’re interested in trying out ImmutableX you can create your account like so:

  • Head to market.x.immutable.com and connect your wallet.
  • Sign in by signing a transaction, and then sign the second prompted transaction to create your ImmutableX key (which will be permanently linked to the Ethereum address you’ve connected).
  • Once your key is created you’re ready to dive in. You can fund your L2 account via MoonPay using the “Buy ETH” button at the top of the ImmutableX marketplace, or you can make an L1-to-L2 deposit of ETH or beyond using the “Deposit” button in the Inventory page.

3) DeversiFi

DeversiFi is a decentralized exchange that, like ImmutableX, is built on its own specialized StarkEx-based validium. The dapp makes it easy for users to trade, pool, and earn with their crypto in L2 fashion.

To onboard with this fast and affordable DEX you would:

  • Head to app.deversifi.com and click on the “Connect wallet to continue” prompt.
  • Pick your preferred wallet option and then sign the ensuing transaction to begin.
  • Next, you’ll create your L2 account. To do this you’ll sign another transaction, and that’s it! Then your DeversiFi account will be prepped.
  • You can then click on the “Deposit” button on the DEX’s main page to transfer funds over from Ethereum or Polygon.

4) Sorare

Relying on NFTs, Sorare is a global fantasy football game with its own bespoke StarkEx-based validium. The trading card game is currently the 11th-largest L2 per TVL according to L2BEAT.

Keep in mind that it’s possible to set up your Sorare account and open and play with your first common cards without ever interacting with rollup tech. If you want to go deeper into the game, though, this will require the more advanced cards that are available on L2. You can create your L2 Sorare account by following these steps:

  • Head to sorare.com and press “Sign up” or “Sign In.” Complete the sign-up process if you haven’t before!
  • Once you have your wallet connected and are on the main Sorare dashboard, click on the wallet button. This will bring up a deposit/withdrawal interface.
  • Complete an ETH deposit from your Ethereum address or use Ramp to buy with via bank transfer or credit card. After this you can buy cards as please through the Market.

How to try out StarkNet

Future versions of StarkNet aren’t going to make use of the state generated during the StarkNet Alpha, so you can think of the L2 as currently being in a testing period on the Ethereum mainnet.

Also StarkNet hasn’t been completely audited yet, so it’s still very early and I don’t recommend aping in with large sums at this point.

If you’re a pioneering type though and are keen to give young StarkNet a spin, consider following the possibilities laid out by StarkWare community contributor odin-free.eth in this recent insightful Twitter thread:

Therein, odin-free.eth advised to start out by downloading Argent X, a browser wallet Argent is developing so that people can easily use StarkNet. They then recommended other options to trial like:

If you test any of these use cases, just remember to accompany your curiosity with caution while StarkNet Alpha is young and still in an experimental state!


Conclusion

StarkWare’s rising L2s are powerful technologies that will continue to mature and will go on to serve as pivotal infrastructure in the blossoming cryptoeconomy.

Looking ahead to the horizon, the next big level-up for both StarkEx and StarkNet will be when their volition modes are activated so people can enjoy superior transaction UX and optimized data flexibility. In the meantime, familiarizing ourselves with these promising L2s now will better prepare us for their prominence in the years ahead!


Action steps

Not financial or tax advice. This newsletter is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions. This newsletter is not tax advice. Talk to your accountant. Do your own research.

Disclosure. From time-to-time I may add links in this newsletter to products I use. I may receive commission if you make a purchase through one of these links. Additionally, the Bankless writers hold crypto assets. See our investment disclosures here.

Account Light mode Log Out