DeFi by Design EP120: Sei Network Explained

18 Jan 2024 · 1:05:59

Sei Network co-founder Jayendra Jog joins The Rollup's DeFi by Design to explain the chain's approach to parallelization and EVM compatibility. The conversation covers Sei's sub-second time to finality since its August 2023 mainnet launch, the tradeoffs of building a parallelized EVM with Sei v2, and how the chain's NFT ecosystem has grown alongside it.

Speakers

Topics

Transcript

welcome back to the rollup High Roller Community as always nothing on the rollup is to be construed as Financial advice we are just an Educators in the defi space toss us a quick like give us a share a repost send it to a friend who may want to watch this and finally give us a sub or a follow it means the world to help support credibly neutral educational content in def5 we're here to educate Empower and enrich you and let's jump in welcome to D5 by Design we talk all things blockchain and cryptocurrency while striving to educate Empower and [Music] enrich going on guys welcome back to the D5 batt design podcast today post ETF it was like uh it was like a

whirlwind as she started or or the blow Mark maybe that's just me waking up from the uh midday nap which one is it Rob definitely definitely a little bit of about there was a whirlwind man it feels like all of a sudden like I mean we're so back but if you've been here you would have known that we were back like three months ago when we really got back and there was it was Bonk and whff and Salon mean coin season so welcome to all the new the new coiners we can call them and if you've been paying attention to say you've been back for for at least six

weeks baby is uh we're at up only season Jay what are you doing over there up only how are you sir up only guys doing well guys it's been a crazy past couple of months as I'm sure you guys can imagine um and yeah thanks for having me on yeah man um obviously you have a pretty cool background uh with regards to kind of uh your entrance into crypto um and then kind of getting into to say so yeah I would love for our our audience to kind of pick up the pieces as to how you put this all together yeah yeah of course so um I guess in terms of my background I grew up in the Bay Area so close to San

Francisco um studied computer science in college and I personally ended up getting into crypto back in 2017 I guess it's kind of wild to say like it's not even the last bu B market anymore now so two bll markets ago um and back then my room it um he was going through binance Labs so both of us ended up tinkering together on a couple of different projects um and that's when I kind of learned about smart contract development um at kind of the same time a lot of my friends from college they were starting to do a lot more trading with crypto um I mean in hindsight it's kind of crazy how things work back then but uh if you were joining us in news Brad software engineer at Facebook um back then you would be getting like 100k

signing bonus so some of my friends they literally took those signing bonus es and they just aped it into eth back when eth was like $40 um and then afterwards they as you can imagine like when you're 21 you're make a shitload of money they just started doing a lot of um D gen trading back in the day um they ended up breaking even from that like I think they made a lot of money lost a lot of money learned a lot of life lessons um but I mean just kind of seeing both sides of that it was just kind of super fun um to be doing stuff in crypto um and afterwards I ended up joining Robin Hood like the Robin Hood um the one that was associated with the GameStop Saga and I initially interviewed for them back in

2017 so at that time there were basically like two houses across the street from each other like you imagine like Rob M being like this established company but back then they literally took bedrooms in the houses they had like standing desks over there and that's where the engineers were working from so it was very much a startup at that time um so yeah I ended up joining up Robin Hood when it was fairly early um I saw the company 10x and I was an engineering lead when the entire game s Saga happened and I mean for anyone that might not be super familiar with it this happened three years ago so it was around the end of January I think it was January 28th of 2021 when everything kind of went down so actually around this time right now it's January 11th

when we're recording around this time three years ago there was this massive kind of mania happening with all these meme stocks there were stocks like GameStop um AMC that there were like a dozen of these socks and there was just a bunch of like retail buying demand for these socks and there wasn't really a high like any kind of like diesis behind it it was just kind of people aping into it because other people were aping into it um and it came a lot of stivity came from subreddits like Wall Street bets I don't know if you guys were like on Wall Street bets back then um yeah I was actually in early entrance to Wall Street bets back in 2018 and back then I thought it was kind of crazy and then it just became insanely Crazy by 2021 um so yeah like people from Wall

Street bets were like buying all these stocks and it just became insane like just how um how much things were going up like how much the price action was happening um hedge funds and like sophisticated Traders saw this they're like hey wait a minute there's like no fundamental value over here this is kind of nonsensical so we're going to short it um but I don't think they accounted for how irrational the market could be so what ended up happening is there's this concept of a short squeeze so shorting the stock is what I just referenced that's when you bet against the stock to be able to short a stock you need to borrow a stock sell it and then buy it back when you want to close the position um these sophisticated firms that were shorting the stock they ended up needing to close their position

because they were they were already down so much money when like GameStop went up like whatever like 500% in the scope of like a week um so because of that they needed to actually buy the stock which let to even more bu pressure so it led to this insane kind of price action where everything was just going straight up to the Moon um and had missed kind of all of this chaos there was one day where just out of the blue robin had decided to turn off eyes and I mean the entire world world was just like pretty frustrated like what the hell just happened um and Robin Hood I I don't think they were doing anything malicious in hindsight like now it's been three years there's been like a congressional hearing about it as well I don't think they were doing anything like fraudulent

um but I do think that they were incredibly opaque with how they handled everything like no one had any clue what the hell was happening internally um even as an employee like I had no clue what was happening and I found out about things at the same time as when they announced it to the rest of the world it was just incredibly frustrating um so my friends were asking me questions because they had positions were like yo I'm losing money on this what the hell is happening um I had nothing to be telling them uh my co-workers like I I was a lead right so people were asking me questions around like what's happening I had to somehow keep up the morale without really having any idea of what's actually happening um and it just makes you feel powerless to go go through an experience like that and I mean after

going through the GameStop Sago I became much more of a decentralization maxi because anything um that is done in a decentralized way is inherently trustless and transparent and would have avoided all the issues that we solve with Rob so that's why back in 2021 uh my co-founder and I we started trying to build a de essentially our idea was let's try to build something like Rob except build it in a decentralized way um this then led to us looking into all the infastructure we could use to build an exchange so we looked into like every layer one every Layer Two um all the infrastructure that existed at the time back in 2021 um and we came to the conclusion that trying to build at that time we wanted to build an orderbook based

exchange to try to build any kind of like hype put exchange um on chin this didn't really work um and that's when we decided to start building the base layer instead so instead of building an app we decided okay let's just build a general purpose layer one and that is what say is say is the fastest chain in existence right now um we started building it around March of 22 as when we transition from like building the decks to building the core layer one um it went live on Main net in August of 2023 so it's been live for I guess around five months as of the time of this recording um and things have been going quite well in many regards uh it's seeing 390 millisecond sustained time to finality so it's faster than

every other chain out there right now um it's like 10x faster than salana because in our case like 390 milliseconds is how long it takes for a block to be faded and finalized in the case of change like salana it might be created in like 400 to 600 milliseconds but the block isn't finalized for like 3 to 5 seconds so it ends up being just significantly better from the user experience from that standpoint um the biggest issue that has become clear in the past five months is that if you don't support the evm it's really difficult to get a ecosystem built um because if you look at the developer landscape right now in crypto essentially everyone that is Crypton

native is an EDM developer there's some people that are like salana developers I would say that's a very small minority right now um and outside of salana developers there's really not any other execution environments that have gotten much traction like move is f State I wouldn't say like zero traction but like pretty close to zero traction um km wasm fuel like a lot of these other ones aren't doing too great either um so the thing that's clear is that if you want to actually support crypto developers you need the evm right now like it's reached that terminal velocity there's no way around supporting the evm so that's why after kind of getting that developer feedback um back in November uh so I think that the exact date was

like November 29th of 2023 so like as you said around six weeks ago um we put about the sav2 proposal so the sav2 is a proposal to build the first paralyzed gvn um and this is Sally let you get the best of both ethereum and Solona since you're able to get the ethereum virtual machine and all the Mind share tooling developer support um that is there with the evm and you're able to get the really high performance blockchain high performance execution environment MBC with LA and yeah I mean as you said it's been just insane after we put that I think it really stuck some kind of um it really resonated with the crypto

ethos and it just led to a massive amount of activity that started to happen um in basically every single side of say like a lot of discussions it led to a lot of activity starting to happen on CH as well um but yeah it's just been super exciting to see all that play out so that's a brief intro about myself inste yeah fantastic I'd like to dive into more of the parallels par parallelization evm kind of that narrative as well talk more about the narratives in the bull market um as well as just kind of say ecosystem and things um but kind of more broadly what would you say were some of the key factors uh from the community from the builders um devs marketing just broadly that have

led to the success of um says growth from lunch um you know kind of what what were the couple you think key factors that other builders or or community members and people can kind of learn from that you guys did well um you know that have led to the uh quick success thus far yeah so for safy one I think there's a few different things that can be kind of studied um the first is the technology itself I think at the end of the day you need to have really good technology to be able to get any kind of AD option um in sa's case it's been the the fastest train in existence and it's also been stable in the sense that there's been like no liveness issues so

far there haven't there hasn't been any like unexpected downtime or anything um so I think that really leads to people viewing a chain as like a quality product if there's no like unexpected downtime um so I think that's been one of the strongest things that has been I think influential in the kind of traction that say has had so far um beyond that I would say the second biggest thing is the community um in say's case I think even before the launch there was a ton of excitement around the chain um just because the kind of things that we were focused on building led to a lot of people that are like very excited about the possibilities of like what this ecosystem could be a few years from now um and after the a V2 proposal I think that led to an even bigger kind of

community um it's actually wild like after the V2 proposal came out um there were some people in the community that started tweeting about how instead of being Sailors like that's what tweet originally come up with for community members in ecosystem it should be saans from like Dragon Ball and Dragon Ball Z um and I mean I hadn't thought about that before but that's like sake and I think a lot of community members thought that as well um and then like the same NW Twitter had like a a poll around like which name should be used and the s name ended up winning so now the community is uh the SS and yeah I mean it's just kind of wild like once there starts to be a lot of chatter like so many people people start getting

involved in that ecosystem and now there's just like the say inates such strong Advocates where everything is happening in the community in the ecosystem um that I think that's definitely been one of the reasons say has seen all like the inscription nft token trading activity um that's been happening so far um yeah I think those would be the two biggest things like the tech and the community that it's goon state to where it is right now yeah it's funny I was talking to a founder of a of an L1 as well and I kept referring to say was like dude look at these memes I was like look at this look at that and so I think that that's been something that you guys have uh have have nailed um amongst of

course the tech which well we're getting close to one to dive into but furthermore on this subject um which proba will take us into the tech what makes say not just another L1 like why why do why does the crypto ecosystem need say blockchain yeah that's a great question so for sav2 and I'll just start talking about sav2 for the rest of this discussion um the core issue that exists right now if you look at so I mean first of all I I think it's clear from what I said before that the evm is here to stay like the theal machine is the default that any developer is going to be using

if they come into crypto right now there's no reason strategically for them to use anything else because that is where all the users are like regardless of which ecosystem you deployed to you're going to be using the evm unless for some reason this strategically makes sense to deploy to right now evm is here to stay so what are the limitations of the evm right now well if you look at the current kind of applications that are built on the evm um and this is true for a ml1 this is true for rollups that are built on top as well none of them were really able to get more than 30 TPS of performance so if by TPS that's a term that means transactions per second and this is essentially how much how many users User submitted transactions

are able to get processed um per second so 30 TPS is very low um it means that you really can't have too much activity happening and that's why youve started seeing a lot of the applications that have gotten built on ethereum so far they end up needing to be ones that cannot uh that need to work in this like less than 30 TPS kind of environment um so one example of this would be an automated Market maker uh so an amm like Unis small um the reason that that does not exist like in traditional financial markets one of the biggest reasons is because uh you are able to have much more liquid and capital efficient markets if you make use of an order book but because you can't really support an order book on chin well guess what

you're stuck using an amm so I think there's a lot of anti- patterns that have started to be used on chain um with ethereum just because you can't really have these high throughput applications um and that is the most fundamental thing that is missing from the ethereum ebo system right now and how does this affect users right well if you can't have more than 30 transactions being included per second um then it leads to a lot of competition to get your transaction included and this leads to high gas fees because if you have like 10,000 people that are all trying to submit transactions and you can only get like 30 TPS then it you need to pay a lot of money to be one of those 30 transactions that's included um so the end user experience over here is high gas fees um the developer experience

here is you just fundamentally cannot build some types of applications so the space is like honestly quite minuscule compared to like everything that you could be designing um and because of that we think it's no-brainer to try to bring uh essentially steale the evm by offering rer through put and that's the clearest thing that's missing right now and I think that's the biggest reason why a lot of developers are excited about A2 as well um ever since we got the internal dbet ready there's been a ton of teams uh reaching out to us to start getting on boarded to that um because it gives them an entirely new design stat with the Evan very cool um and picking up the Devil's Advocate

to uh I guess your entire life's thesis here with sav2 the EVMS broken we just did a podcast with movement Labs founder rushi and of course the activity on these alternative VMS let's just put this aside as if as if uh you know they were picking up tons of traction um the DM's Dead uh there's too many security issues no big institutional players are are are going to put their funds on a chain or a codebase that has um you know that that doesn't have formal verification that that doesn't have um you know local fee markets that that that doesn't have um updatable audit

within smart contracts um that has potential for reent to your tax all these different things right that make the evm not performant and not secure like how how is the evm going to how is the evm going to to compete with better Tech uh and and then based on that like what how is your version of the EDM and then we we can pull up the kind of document how is your version EDM even better yeah so the Ean viral machine is fundamentally what has almost all the activity in crypto right now so it's less of a question of how the evm is

going to be competing with these other execution environments and the bigger question is whether these other execution environments will be replacing the evm or getting greater traction against the evm anytime in the next 12 to 18 months I think the most intellectually honest answer over here is no these other execution environments will not be replacing the EVN I think all the things she mentioned around like formal verification avoiding reeny attacks those are great at the end of the day developers don't give a at all about that like the only thing developers care about is user acquisition building a good product and making money and if the evm lets them do all three of these things they will go to the evm and they don't care about all these other fancy things that you

mentioned if the evm is where all the M share is and where all the users and all the tooling is um so I mean I I agree with the core point that you mean that like the EVN has flaws like reeny attacks are definitely a pretty significant thing to be mindful of when you're writing your contracts um but given that it's a qu seure and complete virtual machine you can build anything that you really want to with the evm so in terms of the functionality that you can offer everything can be built with the evm um so I really don't think that it's going to be like oh oh like both uh ex like move versus evm are going to be consider the same way it's going to be more like can the move uh virtual machine actually replace evm and I think the pretty straightforward answer over

there is no um with regards to how we're approaching um paralyzing the evm it might be helpful to share our blog Cotes so this is a blog post that we put out on November 29th and this kind of goes over our entire approach with sav2 I'll just touch on I think one of the initial things over here so there are three separate things that we're doing doing with sa2 uh the first is we're adding in the G virtual machine and currently with sa1 we support CM WM smart contracts um with save2 there will be the evm getting added in and the evm will be interoperable with existing CM aom smart contracts it'll be a purely additive

change nothing that exists right now will be removed um the second thing is we'll be moving towards optimistic calization so this is a style of calization is very developer friendly so developers still need to Define any dependencies they can just take an ethereum all one smart contract deploy it on say and it will just work um and the third thing that we're doing is we're doing a ton of work around improving State access State commit and State Storage so I see you unmuted yourself proba be all uh stop talking for a second yeah thanks quick question before we we kind of dive deeper like the number two thing on here is parallelization ation uh Andy's an evm parallelization maxi today this is

the first parallelized evm like could you could you break down this concept of of parallelized like what what is it what does it mean why is it important yeah so if you look at the ethereum virtual machine right now so essentially every single evm based chain out there whether it's ethereum L1 or roll up and ALT L1 um they all used to single threaded if they a virtual machine what that means is if you have 100 transactions every single one of them will get processed one after the other um this is really simple to do like from a software engineering standpoint it's really simple to have like these transactions get scheduled one after the other um but it's not very performant because if you

look at Modern Hardware um Modern Hardware has multiple cores and it's able to process multiple things simultaneously so like even if you're listening to this on like a phone your phone is going to have multiple cores and it's capable of like handling multiple work streams at the same time so if you think about it it's kind of silly that like you have the single thread virtual machine um when Modern Hardware is able to offer much better performance than that so the idea behind paralyzation is instead of processing just one transaction after the other um you start processing multiple transactions at the same time um at a high level it's like a very simple kind of concept like just process multiple things simultaneously so for example if like I'm sending you tokens rby and then

Andy you're sending tokens to my co-founder Jeff um these are things that aren't really dependent on each other so they can be scheduled to run at the same time and then you can have better performance in that uh fundamentally there's two things that make this a little bit harder to implement in practice um the first is that you need to figure out what state every transaction is touching um in my state over I mean like which accounts are being touched for example let's say that hypothetically I have 10 say and I send me two transactions one is to send Robbie tensei the second is to send Andy tensei um whatever the second transaction is in this case the one to send tensei Tandy um that should fa because I only have 10 say I've already sent that to Robie right so you need to make sure that in the cases where there

is the same state being touched um you account for the ordering of transactions to make sure that there's no nothing kind of funky volon over there like the first transaction gets processed first and then the second one should bill um so the state access problem makes it somewhat difficult um the second thing is paralyzation by itself doesn't completely solve um scaling the evm because there's a lot of problems with like the way that state is accessed and the way that state gets committed as well um that you need to account for before you can really get that breakthrough in performance so that's what we've been addressing with tb2 uh We've made use of optimistic paraliz to be able to figure out what this these conflicts in State art uh to lead to a much simpler developer experience

because otherwise if if you look at chains like salana for example um developers need to Define what the dependencies are so developers in Solana's case they pass along every single account that is being touched in the transaction and that adds an additional complexity um to the developer experience and then we've also done a ton of work with sty to to help with improving State access and the other things that I was mentioning it finally makes sense that like if it has to touch the same state you do it in serious you it you have to prevent the double spend problem but it's two separate states you're able to execute those in parallel finally it makes sense the only

thing left is learning how to pronounce it so we'll figure that out it's kind of build off of Rob's toy like let's can you give us an example um like I know like the common what is like oh if you're minting if there's an nft mint on ethereum right now it clogs up the entire chain which is say if there's an nft mint in one app that's not going to attack to my defi application swap like is could you explain to us from the user perspective what the paralyzation uh ends up looking like I mean honestly from the user perspective you won't even know that paration is happening um it's all going to be behind the scenes so the end impact on the user is that instead of

paying $100 in gas fees you'll be paying like a tenth of a cent in gas fees and everything else will kind of just magically happen behind the scenes um in terms of like what will actually happen under the hood is that the transactions will get submitted like let's say there's one for an nment there's another just for me to send you tokens Andy um the chain will see that these are non overlapping transactions so it'll be able to process like the mint transaction separately from the transaction to send you tokens and you'll be able to leverage uh the different the multiple courts on the machine to be able to get better performance um because they're not overlapping transaction and gotta and how do you how do you do that without passing the state or the

affected accounts of the state with each transaction yes that's a great question so this is what a high level diagram for it looks like um in s in sa's case we make use of optimistic paraliz um the way that this works is that the chain will try to run all the transactions in parallel first so over here there's these three transactions all three of them will start getting run in parallel um and then the chain will figure out that all the state so all the accounts all the slots that are being updated by every single one of these transactions um so in the case of let's say transaction one is an nft Min transaction two is the same nft Min and

then transaction three um actually in this example let's say transaction one is me sending any tokens and then transactions two and three are kind of tments um then in that case transaction one will just be touching my account and Andy's account and then transactions two and three will be touching whatever that smart contract is that is handling the nft man um so after the chain figure out figures out like what state each transaction is touching then it's able to say that transactions that are uh not touching any conflicting state in this case transaction one where I'm sending Andy tokens um those are good so those will just be uh marked as valid and then you can kind of move on and then in the case where there is any kind of conflict

happening so in this case transactions 2 and three they're touching the same state um then you can take the first transaction and say that is valid because that's the one that would be getting processed first if you're processing sequentially so transaction two would be valid and then transaction three would need to get rerun and let's say that instead of just transactions 2 and three there were transactions 2 through 10 all of them were NS teins then in that case you need to rerun all the nft Min transactions to be happening one after the other depending on their ordering within the block so what if they trade offs of thisapproach right um the biggest tradeoff with this is you need to rerun these transactions so in the worst case all the transactions in the block might be all touching the same

state so then you try to run everything in parallel first you'd see they're all touching the same state and then rerun them all sequentially so that actually leads to a 30% overhead compared to just running it sequentially the first time so if they're like in the absolute worst case it'll be 30% worse than sequential processing um if you look at ethereum L1 though typically not typically you'd never have 100% of transactions being processed um all touching the same state uh in practice it end up being more closer to like 15% of transactions or touching the same state so in a case like that you're able to get just significant performance improvements um from parallelization so transaction three has to wait until the next block

no no no so transaction 3 will still be processed within this block it'll just be like as part of the block block processing it'll be try you'll try to process it once it'll fail and then you'll try to process it again except it'll be using the dependencies of transaction to like whatever updates transaction 2 made it'll take that into account and then run transaction 3 so all this happens under the hood and it's going to lead to a similar uh user experience an identical user experience as sequential processing um and the output will also be the exact same as sequential processing so if you process all 100 transactions one after the other and if you use optimistic paration they'll have the exact same mend state so in this instance users 3 isn't waiting any longer than user to to get

their transaction processed exactly so because all this is happening within the scope of a block being executed of the block being processed all the users will need to wait the exact same time the block will only be done being processed once every transaction in the block is actually been processed and then have you guys looked into what kind of me is possible between transaction two executing and transaction 3 executing like I say transaction two is a big whale and then transaction three is a sandwich bot uh after it but obviously that transaction would have to come after it like how what's what what are the possibilities have there been any research done on on that with this type of penalization thankfully this is actually very simple um there is no additional IM

that comes from this from this paraliz um the reason for that is I mean at a high level if you think about like sequential processing you're given 100 transactions you get to some kind of end State um we're getting to that exact same end state with parallel processing rate like all 100 transactions will get processed in parallel but the output of them will be the exact same as the output from sequential processing so from the execution layer there's no additional me that this introduces the question is then like oh maybe like at the validator level there's like some kind of changes in validator Hardware requirements or network topology that'll result in potentially different access patterns that might lead to Greater um avenues for me um in safe case that is not going to happen um because you don't

actually need to run more performant Hardware to be able to use save you to um it's just taking advantage of the cores that are already on these machines um to be able to get better performance so there's not going to be any increase in Hardware requirements and as a result there's also not going to be any change in network ology it's going to lead to an identical type of um me landscape gotcha cool um all right a lot of this kind of uh thought process from you guys I think is to solve the state buat problem and he a lot about this state bloat problem of ethereum and first just like what even is State bloat how how does it occur why is it

being labeled and things that I've read is like potentially catastrophic for ethereum um or just kind of a problem and then yeah how are you how does this solve that that's a great question so let me just share a tweet that I put out uh couple of days ago okay um so I guess first things first uh what is State and what is State load state is the active data that needs to persist on the blockchain to be able to process any incoming transactions and to be able to generate a state like a state hash that will then be included in

the block header so that that kind of like an academic way of saying it um more practical way is like dat is going to be all the account balances like Robbie has 5 say Andy has 10 Say it'll be all those account balances um it'll also be smart contract state so like this nft contract has whatever state that will be part of the active State um of the blockchain so the issue with having a high performance chain is that you have more transactions that are coming in which then leads to more State updates um that happen which then leads to just greater state so if you have a higher performance blockchain you tend to have more State uh that need to be stored and when you have a lot of

State there ends up being two primary issues um that come with that the first is that it's really difficult to store the state um if you want to have like a validator full node it might only have like 128 gigabyte um hard drive then if the state becomes bigger than 128 gigabytes then guess what you're going to need the entire network to start increasing the size of their hard drive uh which makes it more expensive to run a full node which is then going to lead to Greater centralization um which is bad so that that's the first problem uh the second problem is around State sync so if you want to start running a new node like how do you actually do that well you need to import all the data that already

exists on the blockchain so you need to import all the state in ethereum's case it's close to 100 gigabytes but you need to import 100 gigabytes in state and if you have a high performance chain the argument can be made that in the longer term you'll be actually having even more State than that um so how do you import that efficiently and then also process like while you're importing that there's going to be new transactions that are coming in they need to also update the state of the blockchain with those new transactions so I mean sometimes might take like days to be able to do something like this um which is definitely not ideal like it makes it much harder to start running a new node so those are the kind of problems that we're seeing um in terms of how we're addressing this from safe side we have

this concept of SB um under the hood there's I would say uh two major things that we're doing uh the first is we're using a memory mapped IAB tree um and the second thing is we're having asnc Reds so this is what it kind of looks like with the memory Ma I tree um there's an i tree that exists and this is memory mapped which means that there's going to be three files on dis um one of these files is for uh the key value pairs another file is for the leave another file is for the nodes in this tree and the tree itself if all the state can fit in memory um then it will

so if state is let's say 2 gigabytes um you have 32 gabt of memory um then you'll be able to just fit the entire state in memory and then access becomes really fast because it's already over there so reading like you never need to really read from dis um in the case where not everything can fit in memory then you'll have parts of this that are sitting on disk and then part of it will be cached in memory um so whatever the recent reads are uh they'll all be cached in memory so generally you end up having better performance than that anyway um the question is like how does this improve State storage and state sync so in terms of State Storage uh you can see this graph over here uh we observed a 60% reduction in State Storage so the amount of data that actually needs to be

stored because there's less metadata that you need to be tracking with the memory mapped approach so in the case of this memory mapped approach you don't need to be tracking like every single node in the tree no longer needs to be tracking all this metadata like version height left hash right hash uh the key like key value as well um for example the branch nodes there is no key value that is being stored over there you don't actually need to like have any data that is allocated for that um in the case of a child node uh you don't actually need to have like the left hash and right hash um because that's not actually data that needs to persist um then actually we're we don't need left hat left hash right hash to be there on

any of these because there's tricks you can use even for the Brad notes to be able to calculate like what the left hash and the right hash are but at a high level there's like less metadata that is being stored um less metadata means that there's just less data that you need to persist um so we run the calculations and it's roughly 60% better over there um because there's less data that is being stored uh it's also easier to be um syncing it so we observed a 1200% speed up for stat sying um this comes because there's less data that needs to be written and it also comes because you can paralyze rights um in particular there's just these three files that are there with the memory mapped IBL treat so because you can paralyze those three rights it ends up leading to better performance there as

well so 1200% faster is like massive um so that's a huge win for anyone that's starting to like run a new node um and then the third thing is we have async rights that happen to the database and the way that this works is after a block uh runs there's a chain set that is generated um this change set does not get uh committed to the database as a blocking operation to kind of end block execution instead uh the I Tre is updated and that's all you need to do for Block execution and then behind the scenes in an asynchronous process you first take whatever the change set is you apply that to a rad log which is a

pretty classic um databased uh design technique that's used in several databases like postgress for example um and then from there you have another process that'll take whatever the updates are from the right ahead log and then write that to disk that'll that's when you actually write that to the database um so that also helps kind of speed up this entire process and because of this async approach we observed a uh 287 per decrease in commit time so regardless of how many transactions are being committed um it only takes around 0.4 M millisecs to commit this now um so it ends up being just substantially better over there yeah yeah I appreciate the indepth uh explanation

Rob yeah I find it helpful to remind myself blockchains are are uh they're ledgers so I I picture an Excel sheet here and when I think of State you know I I picture like a bunch of addresses that kind of take up like the leftmost column and I also remember the time when I was first getting an ethereum wallet it was 2016 and I had to run a full node and sync the entire state in order to even put eth eth into an account so there's so many more accounts like that have been created from then until now and I want to clarify one one point though because and then I think this

will kind of like take us down a rabbit hole because when when I picture like a transaction that updates the state something gets posted it updates the balance that is now the new state in the in the spreadsheet essentially associated with that account and then there's like so many new accounts that could add to to add to the state are you saying that every new transaction that gets posted is part of state or is State like a current snapshot of the account balances that doesn't take into account historical balances of each account yeah that's a fantastic question um state is only the

current snapshot so it doesn't have anything any of the historical balances um and this does mean that like there's two separate things that like you kind of need to account for one is current state which is typically what people refer to when they're talking about State blo because um that's like what full nodes need to be handling then there's also historic State um and this is typically what archive noes will be helping with to be able to maintain all the previous transactions that have been coming in and also maintain like previous snapshots um because if if you're trying to like do some kind of historical query you probably want to look at a a historical snapshot um yeah in say case we've actually done work around that as well um the part that I did not touch on

was that when you write to the database you don't actually need to write the entire IDL TR anymore you just need to write the key value pairs now so you just need to write like Robbie has X um this mint smart contract has y um which makes it much I mean first of all there's a lot less metadata that's being stored so it makes it uh easier to be storing that um and this also makes it much easier to run in archive mode because there's less data that need to persist um for previous Heights got it and could you untangle this like this concept of State and State storage and the concept of data Ava availability like where's the intersection like or and like how are

they could you just kind of like untangle those two things for us yes okay so with Celestia and with the ethereum road map around um dink sharting and Proto dink sharting uh this term of data availability has become much more common um and it's honestly a pretty poorly named term I think this last day team has been commenting on that as well that it would have been better to call it state or data publishing um and the core idea with data availability is you need to um you need to publish the data on the network and then ensure that enough nodes in the network have this data to be able to give it to anyone that needs it so this

is something that only really needs to happen at a current height it's not really tied to any historic data that is being stored though people often can uh confuse data availability with like trying to store historic snapshot somewhere um that is not the case data availability is for the current tit so in terms of like how that relates to state um it doesn't it's kind of a separate problem that you're trying to solve entirely and with State blo the issue is just around the current state um and how do you ensure that like nodes are able to track that and you may have you may have hit on this I just want to make it really clear is State bloat only a problem with new accounts that are being

made or so sorry about I mean I I can because you also touch touched on like historical stake but it sounds like that isn't really an issued um as far as state load is concerned because state is only like the current state nothing historic correct yeah so State refers to only the current active data that's needed to persist the blockchain so to be able to generate the state hashes to be able to process any incoming transactions um so State bloat is a problem that'll matter for primarily for the current state of the blockchain um historic state is the previous data but the issue is also that if the current data of the Block Chain is like 100 gigabytes and you need to have like snapshots for like every

single height in the past if the current uh state of the blockchain is Big then it leads to more historic data that also needs to be stored so that's the first thing um I think the second thing you were asking about is whether it's only new accounts that contribute to State Lo um any new transactions that come in they can lead to an increase in state bloat even if there's no new accounts being created so an example over here would be an nft contract um if you have like more transactions coming in where people are like minting more nfts and there's like new data that is being written on chain um then there's no new accounts being created but there's still more data that needs to persist on the blockchain that helps increase didlo as well so it's fundamentally not tight to

new cation it's tied to more data that actually needs to be stored um on the blockchain nice okay uh I'm going to play I got my last my last kind of like tangent here and I want to I want to play Devil's Advocate a little bit because like especially early on when you know new blockchains were really popular it was like well these are these are kind of like fancy databases like and I I I I hear you saying like transactions are like written to databases and databases are updated so can you kind of highlight like what is special about about blockchains and about say that that makes this more than

a database yeah that's interesting because I was hanging out with my family over the holidays and chatting with a lot of my cousins and trying to explain what a blockchain was um the way that I typically describe it is a database is something that's controlled by centralized entity so it might be something like Visa or Mastercard that has basically control over the database and they're the only ones that can really update balances um whereas a blockchain is a distributed database so anyone is able to access that and anyone is able to update that so why does this end up being a good thing well in the case of a normal database like let's say you want to track balances and send money between each other um only Visa might have access to that database so if

Visa decides that they want to censor you for some reason like maybe their CEO just really hates you and they're like oh Robbie I really don't want this guy to be able to access us they can and there's literally nothing you can do about it you just completely lose your agent you lose your ability to have control over the situation and I think most people they just would prefer to be able to have their own sovereignty um so with this distributed setting um no one is able to kind of censor transactions that are coming in um as long as the majority of the networker at least there's like even one node that is willing to accept your transaction um then you'll be able to submit transaction to the network um so that's like the first thing around censorship um and beyond that is also

going to be much more transparent so if you have something like Visa it's completely in the dark you have no idea what's actually happening behind the scenes with something like ethereum um everything is going to be transparent so you can make sure that all the updates that are happening are being done correctly like you have both verifiability and you have the ability to look into the actual current balances and be like yeah nothing sketchy is happening over here so there's a ton of benefits that come um with being able to use something that is distributed trust list on censorship resistance uh are say blocks ofac compliant uh that's going to be up to each validator um from the network

perspective there's nothing that is enforced to try to do anything around uh deciding what block be included and excluded like from the sa blockchain perspective each transaction is literally just like uh bits of data um and the same blockchain doesn't have any anything built in to like analyze these bits of data and to be able to say whether something is valid or not I'm not trying to get you in trouble man with our our three-letter uh organizations or four-letter organizational friends so no that's a I think that's a good answer and it's I I think it's the right answer uh for a properly distributed Network you raise a good point though and I think there's there's some concern with regards to the

amount of validators on say um so I kind of just without having too much of a of a negative thought towards that and obviously um you know starting off with less validators is kind of the state of things no pun intended as you kind of grow and decentralize let's talk about your decision to launch as a Cosmos app chain plans to decentralize your validator set um overall kind of what is the state of of um staking what is why did you choose to launch as a Cosmos app chain and how does that kind of how does being a part of the cosmos kind of how that IBC contribute to what you guys are building yeah so one thing to clarify over there is it say is not a cosos app

chain um say is also not an app chain um you can think of say is essentially general purpose chain so similar to like salana apos s um yeah in terms of how we got built um we took initially took the cosmos SDK and then we fored that I think there's a delineation between getting started building with the cosos SDK and being a Cosmos like part of the cosmos ecosystem I'd say that being part of the cosmos ecosystem means most of your traffic is coming from other Cosmos chains and they're like interchange transactions which is definitely not the case for S um so yeah I mean we initially got started building with the cosmal SD kit because that was the fastest way to get to Market um there's other approaches you can take like building everything

from scratch um but you're kind of free creating a wheel with that approach and making use of the cosmos SDK end up being uman just full faster to build with uh the second Advantage is you're able to start building with tenderman consensus um and in our case we really wanted to offer the best user experience and more specifically the best trading experience and if you have tendermint which has single slot finality you're able to offer really fast block times and have them get finalized very quickly as well and things like reorgs are just not possible um if you're building a consensus mechanism that uses tendermint at its base so that was those were the two primary reasons why you got started building with that approach um at this

point like we Fork both Cosmos and tendermint um and we have twin turbo consensus which helps us get this 390 millisecond time to finality um but I can go over like what changes we made along like block propagation and uh block processing as well as helpful um the the biggest downside of fusing something that is like based on tender um is that you're not able to have a masted validator set um and what I mean by this is with tender you have n squar communication overhead so every single validator needs to talk to every other validator um to be able to finalize a block and to be able to move on to processing and voting on the next law um so that's why you don't really see any Cosmos chains that have more than like

200 validators um the nice thing about this is you're able to get much better ux uh the downside is that you're kind of capped at this 200 validator number um the question is then like how much if your network is already sufficiently centralize how much does having more validators than Network actually matter um I would make the argument that there's the writing on the wall right now that having a large validator set is unnecessary it leads to so first of all it makes it much more expensive to run the network if you have like 10,000 different validators or 100,000 million different validators you need to make sure all of them are making enough money to justify running those validators so it leads to much more um much more

overhead to just even run the chain um and it's a lot of kind of wasted computation um that's happening over there like the if the core thing that you want is to have sufficient decentralization and then also just have verifiability um I think we're moving as an entire industry they're spring on the wall that we're moving towards the direction of having um verifiability happening through Z like like cents versus having everyone in the entire world running um a validator node so for anyone that might be unfamiliar with this idea um the way that it'll work uh with say in the future is that there will be like everyone will be able to run a light client this might be something that is just running as part of your like metamask is running in the

background um and what it will be doing is it'll be consuming zero knowledge proofs of State transitions that have happened on the blockchain and then you'll be able to verify that the state hash is correct and you'll be able to verify that the blockchain that you're um using is like has not been like tampered within anyway um so I'll be able to verify that the blockchain is valid um without needing to actually run every single transaction and redo all that computation um so I mean that that's how say will be kind of helping with verifiability in the future yep yep Ronan have have all learned about that with uh recent podcasts with ail with regards to data availity sampling um interesting to see how that kind of applies as well um an

interesting answer with regards to the smaller validator set kind of getting out of the weeds here let's talk about the say ecosystem so um what are the exciting projects in the SE EOS system from a neutral perspective um defi nfts what are some upcoming projects that our community can get active in the communities and get some Alpha for be early to some upcoming projects obviously it's still very early entirely to the ecosystem so let's talk about uh the ecosystem approach initiatives liquidity incentives uh but let's start with some exciting and upcoming projects uh that you know of that are coming out that our our community can uh kind of take advantage of yeah so the past six weeks have been insane um after the save V2

narrative came out I would say that there's three types of projects that have really started to take off on set um initially we started seeing a ton of inscriptions activity and inscriptions are something that I mean six months ago I never would have guessed that they would be the things that lead to a lot of activity on it um but I mean here we are right now where're uh mid December inscriptions just started going on to every single chain and that led to a bunch of activity I frankly don't really think that's going to be um the killer use case for SE um I feel like inscriptions that don't really make much sense to be some some parts of it I do think make sense where you have like data that is being persisted onchain um but the idea of like having offchain indexers that are running in like

offchain like everything is kind of happening off chain that seems very unnecessary if you already have like a turn complete virtual machine like just write smart contracts instead to help with a bunch of this stuff um so we started seeing inscriptions I don't think that's going to be that long lived um after inscriptions we started seeing a lot more nftd activity and a lot more tokens being launched in the ecosystem that people are trading um I I think that the nft activity in particular has been very very um both unexpected and also just extremely Community Driven like there's a lot of really exciting nft collections that are just being launched every single week right now I think in the past week we've had two pretty major Collections and say is

quickly becoming the home for New nfg launches um I I don't have an answer to why that happened I think it just ended up being people became excited about some of the collections on say um there was one collection called uh the colony which was a Freeman um and I think they just led to a really exciting narrative around that that was kind of similar to um crypto punks from from back in the day and that led the way now there's like several different collections that are starting to become a lot more exciting on say so uh it kind of seems like right now the ecosystem is still quite early um nfts are one of those things that going to probably be a big source of activity on say in the next six months um and I think if you look at how ecosystems typically get built there

ends up being like nft activity and then Primitives that are built early on um in the next three months I think there will be a lot more these core Primitives that are launched so for example like a liquid staking token um another example would be a lending protocol uh and then after this these perimeters are built that's when you start seeing more killer applications that get launched um I don't have an answer for you in terms of like what that killer application on say is going to be um but once you have like a community that is actively doing stuff on chain and you have these phot is built out um I think that becomes much easier to be oring from the the foundation or lab's perspective is there um once this ecosystem gets you know you know starts

to grow more and um you know kind of flourish is there plans to incentivize with uh say tokens or incentivize in different ways also are there are there incentives for developers to come build on SE um in terms of what has been publicly announced so far um uh there currently is no no types of incentives that have been announced um with that being said I think that things seem to be quite fluid in crypto um so there's a very real chance that sa Foundation would consider that in the future I definitely don't think that's off the table um in terms of developer incentives right now there's like no official incentives

around that either uh most of the developers in activity that we're seeing right now is kindly just completely organic like the entire Sayan initiated like that was not like St lab St Foundation was not involved with that at all that was completely Community Driven um a lot of the new projects we're seeing like these nft collections a lot of the quines are being launched completely Community Driven as well um so interestingly I think that we're starting to see very real activity happening even without involvement in the foundation which I think is the kind of best spot that you can get to um so yeah in the future there probably will be something that say Foundation does um I think it just ends up being pretty common to see that playing out but at the moment there's no like incentive programs in

place you can you can go ahead and announce it now if you like no I mean I first of all I'm only associated with s laabs and I don't think say Foundation is has any actual pocy either what are the best options to uh bridge to say and um how do you how do you get uh say tokens to pay for gas so if you want to bridge from other ecosystems on to say uh there's three different ways you can do that um the first is Wormhole second is absar um and third is IBC so you can make use of all these Bridges um moving forward once there's evm compatibility there will be other bridges that are supported as well um so that should make the experience

even clear um if you want to get say right now I think the most common approach that I've heard of is people buying on centralized exchanges uh and then just withdrawing from the centralized exchange onto ACA wallet uh in terms of liquidity the ecosystem I would say that there's stre for improvement on liquidity so if you're trying to like bring over uh from another ecosystem and then swap that per se there might be higher um uh what's the term for it Sage yeah there might be higher slippage than if you just trade on a centralized exchange and withdraw it yeah makes sense um and then uh for for for those who haven't um access sayya is what are the supporting

wallets yeah so the main wallets in the ecosystem are compass and Finn um at the moment but after the evm launch happens um metamask and every other ethereum wallet will also be usable um one of the things that's really nice about sa2 is the interface for people to be interacting um would say remains it is the exact same as like the evm interface so all existing evm tooling will be seamlessly reusable so there's going to be metamask and there's also metamask snap that is going to be ready by m at time as well um so you can just use metamask to do everything in the same ecosystem moving forward or rabby I like rabby more um

cool um and then what kind of um plans do you guys have for uh interoperability or um collaboration with uh other uh ecosystems or gaps are you planning to try to bring on some of the uh ethereum gaps or uh other ecem gaps to say will you think about how to do this with grants liquidity marketing what are your plans to grow the ecosystem and to establish more liquidity and more uh depths yeah so interestingly there's already some ethereum applications that are considering coming over um so either from like ethereum L1 in terms of how I

see the ecosystem progressing um I think there will initially be people that are coming over from existing ecosystems and then deploying some type of multi-chain application um in general I don't think multi-chain applications end up being the ones that lead to the most uh both success for that project and also success for the ecosystem so I think it's going to be kind of um multi-step approach where like initially projects come over from ethereum and some other altel ones like Avalanche for example we've had a few projects uh that are like leaving the Avalanche ecosystem and coming on to say um step two is once these projects start finding success it becomes easier and easier for developers to justify going Allin on say um once that happens I think you'll see more

applications that are exploring this new design space that Z offers um the new design space being high performance evm applications um and I think those type of applications will be the ones that have uh both genuine product Market fit on say and also the on to become the killer applications that help kind of uh Tak a to the next level it's a great great case study like inscriptions are like tremendous to demonstrate scale which I think is is a unique value of say whereas like you get you know point to a lot of these other chains that aren't able to handle uh the stress test that they got from inscriptions uh not to say that it's the

you know killer app on say but it does demonstrate the opportunity of another killer app to come along and utilize the scale exactly like with inscriptions we I mean say didn't really have any issues at the core chain level um I think we're processing more than like 200 transactions per second at the time and with S 2 We've ran low tests um and with optimistic realization and all like the state changes that we made uh we're able to get over 5,000 TPS so sav2 is actually going to end up being like 100x improvement over what you're seeing already with the virtual machine love it well Jay as we kind of wrap up um any kind of closing thoughts for our community and um for the S

Community as well who are uh patiently watching yeah the closing thoughts on my side are that um sa2 is one of the biggest initiatives that seabs is working on right now um in terms of what it's going to take and next steps around that uh the first thing that we're aiming for is to have an internal devet um we ended up getting that ready ahead of time um and we kind of posted videos for like what that in experience looks like from a month ago so we actually had like a sav2 war room happening uh last month and the entire team got together we got the internal de devet built um then we also had uh the initial team um the deploy to it so that that's step one um step two is audits so savy 2 um we

started getting it audited by both zelic and OTC um so super high quality firms that we're working with um step three will be a public test net that will be happening sometime in q1 of 2024 um and then there'll be the public main net which um assuming the governance approves that should be sometime um in H1 of this year so yeah ton of stuff to look forward to over there and uh things are moving quite quickly yeah awesome man thank you for uh for coming on and congrats again on the great success and let's keep Building Man all right thanks for having me on guys