Blockchaininfrastructurehasevolvedtoencompassanecosystemoflayer-1andlayer-2networks.

Inthisarticlewe’llexplorethedifferencebetweenthetwo,andhowlayer-2networksandotherscalingmethodslikesidechainsattempttoaddressthescalabilitychallengesoflayer-1blockchains.

Whatarelayer-2networks?

Simplyput,layer-2networksareblockchainnetworksthatliveatopalayer-1networksuchasEthereum,withthelayer-1networkprovidingthebaselayerofinfrastructureandsecurityfornetworksbuildingonit,validatingtransactionsandachievingconsensus.

Thelayer-2networksuseavarietyoftechnologiestoaddressscalabilitybottlenecksonthelayer-1blockchain,whicharecausedbythroughputandtransactioncosts.

Ethereum,forexample,currentlyhandlesaround14transactionspersecond(TPS),perblockchainexplorerEtherscan.Visa,bycomparison,processesaround65,000transactionspersecond.

Scalabilityissuesaremostpronouncedduringperiodsofhighnetworkactivity,whenblockchainnetworksfaceincreasedtransactionfees(alsoknownasgasfees),alongwithnetworkcongestionandreducedtransactiontimes.

In2017,EthereumcreatorVitalikButerinidentifiedthe“scalabilitytrilemma”forblockchains,arguingthattheyfacethechallengeofprocessingthousandsoftransactionspersecondwhileremainingsecureandadheringtotheethosofbeingdecentralized,thatis,runwithouttheneedforcentralizedcontrol.

The\"scalabilitytrilemma.\"

Thetheory,importedfromcomputerscience,isthatanetworkcanonlyeverfocusontwooftheseprinciplesbymakingconcessionsattheexpenseofthethird.

Ethereum’ssolutiontotheproblemofscalabilityistofocusonmakingitsownlayer-1blockchainnetworkassecureanddecentralizedaspossible,whileoutsourcingscalingtolayer-2networksbuiltatopitsinfrastructure.

Howdoscalingnetworkswork?

Scalingnetworksdeployavarietyofdifferentsolutionstohelpaddressthescalabilitychallengesofthelayer-1network.

Thesenetworksincludebundlingtransactionsorprocessingtransactionsoff-chain,usingsidechainsorlayer-2rollups.

Sidechains

Sidechainsareblockchainsthatrunindependentlyofthelayer-1chain,withtheirownconsensusmechanismandtoken.

Theyconnecttothelayer-1blockchainbymeansofabridge,whichusesasmartcontractto“lock”assetsfromthelayer-1chainandmintamirrorimageofthosetokensonthesidechain,withthevalueofthosetokenspeggedtothelockedasset.

Thesemirroredtokensarethenusedtoperformtransactions,afterwhichtheycanbedestroyed,releasingthelockedtokensonthelayer-1chain.

Rollups

Rollupstakeadifferentapproach,byrollingup(hencethename)multipletransactions,presentingthemtothelayer-1blockchainasasingletransactionthatcanbeprocessedmuchmorequicklythantheindividualtransactions.

Therearetwomaintypesofrollups:optimisticrollupsandzero-knowledge(zk)rollups.

Optimisticrollupsassumethatalloftherolled-updataisvalid,allowingpeopletocontesttransactionsafterthefacttodeterminewhetherthey’relegitimateornot.Thecontestedtransactionissubmitteddirectlytothelayer-1networktosettlethedispute,withbothpartiesstandingtolosestakedtokensshouldtheybeprovedwrong.

Zero-knowledgerollupsemployzero-knowledgeproofs,acryptographictechniquethatcanbeusedtoprovethatsomethingisknownwithoutrevealingtheknowninformationdirectly.Transactionsarerolledupintobatchesthatareexecutedoff-chain,withthecompletedbatchsubmittedtothelayer-1chainusingazk-proofthatdemonstratestheproposedstatechangesarecorrect.

Ethereumscalersyouneedtoknow

Thereareanumberofdifferentlayer-2andsidechainnetworksbuildingatoporalongsideEthereum,eachwiththeirownpreferredtechnologicalsolutiontoscalethelayer-1.PerCoinGeckodata,thefollowingarethelargestEthereumchainsbytotalvaluelocked(TVL),asofNovember2024.

Base

IncubatedbycryptoexchangeCoinbase,BaseisbuiltatopEthereumscalingsolutionOptimism.Itquicklyestablisheditselfasaleadingplayerinthelayer-2spacefollowingitslaunchinAugust2023,surgingtooveronemillionaddressesinjust11days.AccordingtoCoinbaseCEOBrianArmstrong,theexchangehasnoplanstolaunchatokenforBase,andisattemptingtomakeBase“somethingthat’smuchbroader”thanaCoinbase-ledproject.

Arbitrum

CreatedbyOffchainLabs,ArbitrumleveragesoptimisticrollupstoscaleEthereum,withaclaimed40,000tpsversusEthereum’smorestately14tps.InMarch2023,ArbitrumlauncheditsnativeARBtokenforgovernance,handingcontroloftheprojectovertoadecentralizedautonomousorganization(DAO)madeupofcommunitymembers.

Polygon

FormerlyknownasMaticNetwork,Polygontakesamulti-prongedapproachtoscaling,deployingmultiplesolutionsincludingitsmainPOSChain(sidechain),Plasmachains,zk-rollupsandoptimisticrollups.Itaspirestobemorethanjustascalingsolution,billingitselfasaplatformforlaunchinginteroperableblockchains.InSeptember2024,itcompleteditsmigrationfromitsoriginalnativetokenMATICtoanewtoken,POL.

Optimism

LaunchedonmainnetinJanuary2021,Optimism—asitsnamesuggests—usesoptimisticrollups,whichassumethatalltransactionsintherolluparevalid.Optimismfurthercompressesthedatainitsrollupsusingasequencer,beforesubmittingtransactiondatatothemainEthereumchain.Validatorsforeachrolluparegivenaweektoquerytherollupiftheybelievethatitcontainsfraudulentdata.

Scroll

Arelativelynewentranttothelayer-2space,ScrolllaunchedonmainnetinOctober2023.TheplatformuseszkEVMtechnologytobatchproofs,leveraging“bytecode-levelcompatibility”withEthereumVirtualMachinesupporttoensurethatEVMapplicationsandtoolsarecompatible“out-of-the-box.”ScrolllauncheditsSCRtokeninanOctober2024airdrop.

Blast

LaunchedbyateamledbyTieshun\"Pacman\"Roquerre—founderofNFTmarketplaceBlur—inFebruary2024,Blastdifferentiatesitselffromotherlayer-2networkswithfeaturesincludingnativeyieldforETHandstablecoins.Thelayer-2conductedanairdropofitsnativetokenBLASTinJune2024

Thefutureoflayer-2networks

Layer-2networksformakeypartofEthereum’s“rollup-centricroadmap,”accordingtoEthereumco-founderVitalikButerin,whohopestouselayer-2solutionstoincreasetheblockchain’scapacitytohandleover100,000transactionspersecond.

ButerinhasoutlinedplanstoconvergeEthereum’stwoscalingstrategies,shardingandlayer-2protocols,inwhathedescribedas“TheSurge.”Thisroadmapwouldseelayer-2blockchainsimplementcryptographicsolutionssuchasSNARKs(SuccinctNon-interactiveArgumentofKnowledge)toensuretheintegrityoftransactions.Buterinalsoseekstoensurethatlayer-2networksinheritEthereum’scoreprinciplesoftrustlessness,openness,andcensorshipresistance.

Layer-2networksaren\'tjustconfinedtoEthereum.InJune2024,codersatBitcoinOSclaimedtohaveverifiedazk-proofontheBitcoinmainnetforthefirsttime,openingupthepossibilityofusingrollupstoscaleBitcoin.Solanaisalsoseeingincreasinglayer-2activity,suchasviathegaming-centricSonicSVMnetwork.

Meanwhile,newlayer-2networkscontinuetospringuponEthereum.InOctober2024,decentralizedexchangeUniswapannouncedplanstodevelopitsownlayer-2network,Unichain,usingOptimismtechnology,pluscentralizedexchangeKrakenwilllaunchitsownOptimism-basedlayer-2calledInk.

EditedbyAndrewHayward

decrypt.co