# The L2 Test ![snake oil](https://gateway.pinata.cloud/ipfs/Qmd2RjcRaB1Vt83UDmP2P6G1G4mmvx25KuRpiUzQKbT1DD) **Blockchain engineers and researchers, consider making your voice heard on whether you agree with this document. Misleading marketing does real harm.** ## Arming the Wojak An interesting discussion on [Pythia](https://curate.kleros.io/tcr/0x54A92C21c6553a8085066311F2C8D9Db1B5e6610/0x61c3450da32008d8bd0a8c6c940d2fbf2c9d898d513458f48b55c51f263f645e?chainId=100) made me notice that if you are a blockchain investor, communicator or just an enthusiast, you may have some trouble differentiating between layer 1 and layer 2 blockchain tech recently. Unfortunately this is a technical question and answers are typically lengthy or full of technical jargon. This post tries to fill that gap by replacing a question that is small but usually returns huge answers: **_Is this an L2 network?_** with a big question that returns a (hopefully) very small answer: **_Can I withdraw my assets just by sending transactions to the L1 directly?_** The nice thing about this question is that: 1- It should give a yes or no answer in most cases. 2- It should generally match its slightly more technical counterparts: _Does this network inherit the censorship resistance budget of the L1?_ _Can users running their own nodes trustlessly exit state from the L2, provided it(the L1) is live?_ The objective is to know whether it is ok for the L2 operators to completely disappear tomorrow or become non cooperative. Assumptions: - The L1 is censorship resistant. - The user is running whatever node(s) necessary (e.g. L1 and L2 nodes). First let's test the question with technologies, then we'll do live products. ## Technologies Here are listed _families_ of technologies. The reader should never assume a deployed product or specific solution is a layer 2 just because it is advertised that the team behind it is attempting to use one of these. This is specially the case for: - Products on training wells, using (for example) upgradable contracts. - Products using dangerous settings such as plasma with a too high bandwidth ceiling or too short exit challenge periods. ### Payment and State Channels E.g. Bitcoin lightning, Ethereum Raiden. > Can I withdraw my assets by getting exit transactions mined on the L1 directly? Yes. ### Rollups E.g. Loopring, Fuel > Can I withdraw my assets by getting exit transactions mined on the L1 directly? Yes. ### Plasma E.g. OMG. > Can I withdraw my assets by getting exit transactions mined on the L1 directly? Yes. Reminders: As mentioned before, this assumes: - The user is running all the required software themselves (both L1 and L2) so they can't be affected by data availability issues. - The implementation is using proper bandwidth ceilings and exit challenge periods (to prevent issues during mass-exits). **If the user cannot withdraw from the L2 by getting exit transactions mined directly on the L1, it's not an L2.** ### Sidechains > Can I withdraw my assets by getting exit transactions mined on the L1 directly? No. Sidechains have their own censorship resistance budget, so they are L1. We must also separate analysis by the capacity of each chain to validate the state of the other. - Sometimes chain A cannot validate the state of chain B and the budget degrades to the controllers of a multisig in chain A; - Sometimes chain A can validate the state of chain B but require you to submit the transaction to chain B to initiate the exit, so the censorship resistance and liveness degrades to whichever chain has the lowest budget. Some sidechains have both weaknesses. Assets on Layer 2s have neither (provided you are running your own nodes). **If the user cannot withdraw from the L2 by getting exit transactions mined directly on the L1, its not an L2.** Further study: ![](https://i.imgur.com/BizzGdf.png) https://twitter.com/gakonst/status/1146793685545304064 ![](https://i.imgur.com/KP7zu6T.png) https://twitter.com/peterktodd/status/953511085008609280 ![](https://i.imgur.com/u8K9WFN.png) https://twitter.com/dankrad/status/1393721324300865537 ![](https://i.imgur.com/7CouhOo.png) https://www.reddit.com/r/ethereum/comments/it22g2/whats_the_difference_between_layer_2_and_sidechain/ ## Learning by examples Lets test claims about real products in the wild. **Important: These L2 tests were done at the time of writing (circa Aug 2021). Results may not be the same when you are reading.** ### Bitcoin Lightning Network Let's say you are new to the space and someone tells you that actually bitcoin is a lot greener than what has been portrayed on the news. It can process potentially an infinite number of transactions per second. Not only that, he claims this is live today. You are skeptical. So he sends you [this MIT link](https://dci.mit.edu/lightning-network), claiming that there are _x_ thousand bitcoins in the lightning network being transacted cheaply and instantly. ![lightning, a layer 2](https://gateway.pinata.cloud/ipfs/QmUogGB4ogvXrWAKBg15BxQXEZ5NzHJ9oQ8jvtKGe8QQCT) How do you check if lightning is really a layer 2? How do you know the assets on lightning are actually bitcoins and not [IOUs](https://en.wikipedia.org/wiki/IOU)? > Can I withdraw my assets by getting exit transactions mined on the L1 directly? Yes. To prevent you from using the bitcoins you had on lightning, someone needs more than 50% of the security budget of the L1 (bitcoin's in this example) or take out all the miners of the network (liveness budget). - No need to ask for cooperation from anyone. - Assets on L2 derive its censorship resistance from the L1. - Bitcoins on lightning are bitcoins, not IOUs. ### Ethereum You see someone on twitter claiming that Ethereum is a bitcoin layer 2, just like the lightning network because Wrapped Bitcoins get locked on the L1. How do we test this? > Can I withdraw my assets by getting exit transactions mined on the L1 directly? No. The peg relies on a multisig so the censorship resistance budget of the asset does not match that of the L1 (bitcoin). wBTCs are not Bitcoins, but IOUs. Ethereum is not a bitcoin L2 here. **If the user cannot withdraw from the L2 by getting exit transactions mined directly on the L1, its not an L2.** ### Mt. Gox et. al. > Can I withdraw my assets by getting exit transactions mined on the L1 directly? No. Centralized exchanges and banks have their own censorship resistance budget. The number that appears next to "ETH" on your exchange wallet does not actually tell you how much Ether you have, but how many Ether IOUs you have. _You don't trade or transfer cryptocurrencies inside centralized exchanges, only IOUs._ **If the user cannot withdraw from the L2 by getting exit transactions mined directly on the L1, its not an L2.** ### Polygon Commit/PoS sidechain Here one might think that the original question would get a lot more complicated since Polygon and Ethereum support smart contracts, but it doesn't. The user only needs to remember that what matters is _state_. If the dapp is currency, the state is balance. If the dapp is voting, the state is the tally. > Can I withdraw my assets by getting exit transactions mined on the L1 directly? No. Polygon Commitchain/PoS doesn't inherit Ethereum's censorship resistance budget and instead has its own, so it's an L1. ![](https://i.imgur.com/AXVxZde.png) https://twitter.com/jadler0/status/1387151199053418499 ### Liquid Network > Can I withdraw my assets by getting exit transactions mined on the L1 directly? No. Instead of matching bitcoin's censorship resistance budget, Liquid's has its own budget: 11 of 15 keys + trust in the permissioned hardware. LBTCs are not bitcoins but promises emitted by the 2/3 of the HSM handlers that they will always be redeemable by 1 BTC on the multisig. Of course, if they just do not accept the request (e.g. the HSMs go offline) your bitcoin is gone forever, so it's an IOU. I tried finding who are the 15 entities but all I could find was that blockstream is one of them and a promise that they are dispersed. Do you know who they are? ![whitepaper](https://gateway.pinata.cloud/ipfs/QmbyTAQ6HqjWsTitFurAkPqBM6rQgFguLJ7FKBW7Bd5wGi) Source: https://docs.blockstream.com/liquid/technical_overview.html ![liquid network](https://gateway.pinata.cloud/ipfs/QmcYRRjRmq3Wkvp8genvEkEdsof7SEiggPAWLrywgNJijY) Source: https://blockstream.com/assets/downloads/pdf/liquid-whitepaper.pdf If it has its own security budget it's not running on top of it, but on its side. An L1. **If you cannot withdraw your assets from the L2 by sending a transaction to the L1, it's not an L2.** ### Optimism, Arbitrum, zksync > Can I withdraw my assets by getting exit transactions mined on the L1 directly? No. As of August, 9th 2021, instead of matching Ethereum's censorship resistance budget, all these networks have their own security budgets in the form of whatever keys can upgrade the contracts. So they are not L2 networks yet. ### RSK PowPeg > Can I withdraw my assets by getting exit transactions mined on the L1 directly? No. Instead of matching bitcoin's censorship resistance budget, RSK has its own budget: the 12 PowHSM handlers + trust in the permissioned hardware. RBTCs are not bitcoins but promises (IOUs) emitted by the PowHSM handlers that they will always be redeemable by 1 BTC on the multisig. Of course, they can just ignore the request and break the promise. I tried finding who the 12 securing the Powpeg are but all I could find was that leading blockchain companies are included. Do you know who they are? ![12eyes](https://gateway.pinata.cloud/ipfs/QmNkx1JG1NiNCi1oTyRrJpZcuSxM9TV9NacmEUdv57kARs) https://developers.rsk.co/rsk/architecture/security/ ![iovlabs](https://gateway.pinata.cloud/ipfs/QmPZUwU57GL8mqg28kqQXoSuyfz7QwdoYWQ4EECAWz8HJA) https://developers.rsk.co/rsk/architecture/security/ Hopefully they are located in very different countries. Once again: **If the user cannot withdraw from the L2 by getting exit transactions mined directly on the L1, its not an L2.** ## Final Words A layer 2 allow its users to trustlessly exit to the L1 provided: - They follow the "Not your keys, not your coins" rule (i.e. they self custody); - They can run whatever software is needed. Is there a project you'd like to see added to this post? Did I get a fact wrong or forgot something? Comment!