From Layer 2 to Layer 3
ETHCC 5 · July 2022 · 18:57
Pierre Duperrin shares Sorare's experience moving to StarkEx and the resulting tradeoff between scale and composability. The presentation considers a further Layer 3 design being explored with StarkWare.
Speakers
Topics
From ETHCC 5, hosted by Ethereum France.
Transcript
sudan hi everyone i'm pierre i'm a software engineer at sohar today i'm going to talk about layer twos and layer threes and why we consider using a layer three at sohar i won't dive into the technical details
but like give more an explanation from a product standpoint why it makes sense for us to consider layer 3. before going down the ethereum layers rabbit hole i gave a quick uh intro to sora for people who don't know what it is so basically sohar is a is a fantasy football game you basically buy and trade nfts that represent football players so like for instance here you have like five nfts to compose a football team with a goalkeeper midfielder defender and forward etc
once you compose your team uh during the weekend there will be in real life uh sport games and depending on how much uh how well your player performs uh your card will get will get a score basically so that's what you see at the bottom in yellow and green and at the end of the tournament basically you can outscore the other participants and the one who runs better basically earns ease and our player cards one thing that is core to our product is utility which is which is why we have a game
but also what is very important is our marketplace it's an open market where you can trade nfts i'd like to explain what what has been our blockchain journey at soar as you all know blockchain is evolves very quickly so we had to adapt over time so so i was founded four years ago in in the summer 2018 and the product was launched first quarter of 2019 basically when we launched we started on on a pos
evm chain which was called the loom loom network it was a perfect match when we launched solar super low fees only a few seconds latency but in 2020 basically the validators uh started um no longer validating the chain uh so the chain was kind of dying and we had to move away from that pos chain which was like marketed as a ethereum side chain so comes may 2020 we basically decided to move to it on mainnet at the time gas price were around fog way
east usd was around 200 200 usd for one eath so like a mint was costing about approximately 20 20 cents of a dollar but in 2021 east usda's price has skyrocketed so did the the gas fees and we ended up paying like up to 90 dollars for a mint compared to the 20 cents we used to pay that's not sustainable um our mission is also to bring crypto to to mainstream people that means nfts that are worth maybe a few bucks so we cannot like deal with 90 dollar mean price for for
an object that only worth two or three dollars and as for minting and trading is the same it was cost it would cost 20 to 30 dollars to trade trader card and outside of gas price there was also like settlement delays like on gas spikes we would basically delay settlement by up to 24 hours which is really poor user experience especially for non-crypto native users so that's why we we decided to to to move once again and we decided to to build on a starkx which is a zika rollup that is built by starkware so we did a migration second quarter of
2021 and we've been live on star x since july 2021 so we're going to see what's going to happen next um if i'll give a a brief explanation of our current layer 2 setup so our rollup rolls up to ethereum so ethereum is our settlement layer it's powered by starkworn so that's what i said it's a validium roll-up so it's a zika rollup with no unchained data which which makes the roll-up less less costly and one thing that is important and it's that it is app specific so the only
thing you can do with our roll-up is basically mint and trade uh east erc20 and erc721s that's all you can do and it can only be used by soar we basically act as the sole transaction sequencer so it's fairly centralized but you have like a decentralized way of exiting the roll-up without going through us so we keep that self-custody aspect so what are the benefits of our layer 2 setup so first it inhibits the etlm security which is key to us security and decentralization it's optimized for the application use
case so it works very well for our product it has low latency so we can offer settlements in order of magnitude of a few seconds we have predictability around usage and fees so we are the sole user of the roll-up so we won't have another project that does a nft drop or there is some defile liquidation going on or a bull market that is not in our control so we have full control of what's going through the roll-up um and basically we have a fixed cost of running the the roll-up which is basically 2.4 million gas on a daily basis what this means what is super important is that we have zero marginal cost you
can basically double the number of nfcs we're going to sell is not going to change the price we pay every day for transaction fees and what this means is that our our users they never pay transaction fees they don't know what transaction fees are like most of our people we onboard that come from more from a fantasy world not a crypto world they they don't really know about transaction fees and that's really key to us so we're pretty happy because we've reduced the the friction to web 2 kind of friction so no transaction fees no settlement latency so we are quite happy with that as we as i speak right now we're going
to launch mlb which is major league baseball so we're expanding into a new sport and that will be done at the zero marginal cost so it puts a puts us in a very nice place if you want to expand our business but so there's like drawbacks with with our setup first one is composability uh there's no composibility because it's an application specific hold up so if you want to be able to do compressibility you need to withdraw your nft to hr mainnet which is costly you don't have portability as well if you want to move to other layer twos you have to go through ethereum as well
and there is like no real ecosystem at our level uh so there is some through a term because of the wallets and and all of that but we have to build a lot uh specifically for for our roll-up so for instance we have on-ramp providers moonpay and home network and basically they had to do a custom integration with our roll-up but what that means for our users is if they want to buy crypto they just pay by credit card and they get crypto directly on our layer 2 with no transaction fees either but everything is custom so it takes time we don't benefit from like an economist scale also we have uh you know nft trackers
are pretty important uh in the ecosystem they basically give a kind of a idea of how healthy an nft project is and they also have to do custom integration with regards to composability we would love that our community would be able to generate site games tools maybe put on some lending protocols or use dios or whatever i mean there's lots to do they are already very active but they today they do com they do side games in a web 2 fashion but we would like we like to offer them with something more
powerful and that's why we are after our composability so what are the the solutions um one first solution would be to basically instead of rolling up to a term hold up to another layer one because a term today is is too expensive it's becoming a settlement layer and has a layer a roll-up centric roadmap so it's not going to be a consumer a blockchain as such so we could like roll up to another layer 1 but what is important is that basically your layer 2 inherits the security of your of the layer one of the settlement layer
our beliefs are that the settlement layer should be as secure and decentralized as possible it's the ultimate responsible for granting who owns what of the settlement layout doesn't really matter and we also firmly believe that scalability is achieved horizontally i mean it's like anything in it if you want you cannot scale a processor speed up to infinity at some point you're going to have to scale horizontally so our belief is we want something that scales horizontally that is secure and decentralized and that's basically it
so we want to stay we're going to keep rolling up to it around so another solution basically is to instead really to instead of rolling up directly to ethereum is to roll up to a i called it a composability layer but that would basically be a public layer too um it could be an optimistic roll-up it could be a zika roll-up could be starkness it could be arbitrary any kind of ethereum layer 2 basically what is important is uh our roll up is a ck roll up so it has instant finality when you withdraw a token so when you move the token from the application layer to the
composability layer it is it is usable right right when you move it right if you use an optimistic hold up you have like a seven day uh grace period where you can't really you don't really own the the nft on the on the layer where you've withdrawn the nft so basically what this means is we can move nfts super easily from layer 3 to layer 2 and by going on a public layer 2 will have lower transaction fees than ethereum but we'll still have like a an ecosystem so if we if you think of arbitrage or start net there is a broad ecosystem that is being built on those public layer twos so this is kind of the the setup
that we we are looking into for for probably uh 2023 and so what makes a good composability layer so that's what we think makes a good composability layer is security and decentralized decentralization is essential because basically you're going to trade security of ethereum with the security of your lay of your layer 2 of the composability layer so it has to be as least as it has to be as secure as as layer 1. um it has to have a strong ecosystem builders and users on and off ramp centralized exchange deposits and withdrawals
bridges to other tools and all of wallets and all of that basically so we are looking for a public a term layer 2 that is secured secured and decentralized and it has a very active ecosystem yeah that's it i'm open for question if you have some so why should you go to a layer 3 instead of building on a layer 2 that already have the composability and so on yeah so this is what i try to explain is
we have a rollup that is app specific today so it's very optimized for what we do the the core thing we do right uh minting and trading it does that very well at a very low cost we have predictability we know how much we we are going to pay if we're going to build directly on a layer 2 we lose that predictability because there's going to be a free market that's going to evolve over time right you don't you don't really control that um so we want for like the the core product experience which is minting trading that to be optimal and to be like web to life for our users withdrawing your token to layer two to a from layer three to layer two will be
for like more advanced users crypto users maybe you wanna put a token on the dio maybe you want a dio to be playing the game you'll be you know those kinds of things so it's really having an app specific optimal setup that does that very well and but also can kind of bridge to a more open ecosystem thank you hello um i would like to know if if there's like an eth maximalism going on or if you are closely watching what diy jax has been doing because they have been switching to cosmos
now they are arguing that it gives them maximum flexibility by not paying fees and basically giving them composability and everything and probably the second question would be are you planning to move away from stark x at some point or do you just plan to stay on layer 3 plus dark x or just moving to like a completely composable layer to solution okay so that that's a good question uh we're not like considering leaving like the 8rm ecosystem [Music] building on cosmos is a lot of work i mean it's i think it's still holidays of course mostly interesting project but it's early days in terms of
like just if you talk stable coins right i mean in our roadmap we'll introduce a stable coin because uh for non-crypto users having like uh 20 swings of their ease balance on the game doesn't make sense right because most today doesn't really have a stable coin so that's one thing right um so right now we prefer staying on interim we believe that the ecosystem is stronger because most you have to basically maintain your chain so it's a it's a whole other game right you have to think about governance validators and make sure you have in enough validators to have decentralization that you could have on
that you have an interim right so i don't think we are ready for this yet we believe that today like it this kind of ethereum plus layers gives gives us better security and and a better ecosystem i do believe that composability on cosmos would be more native but today the trade-off is that we would rather have the solution i presented thank you hello have you already decided to use stock net as you layer two or is it still uh in research
no we haven't made any decision yet it's it's probably a natural candidate especially since they they worked on a zk proof recursion so it means that basically you can prove on stack net that something has been verified on starkx so it makes it very powerful powerful so it's probably a natural candidate but we haven't made any decision yet okay thanks okay thank you very much [Applause]