ExploreTrendingAnalytics
Nostr Archives
ExploreTrendingAnalytics
Super Testnet13d ago
A layer two (aka "second layer") is a service where users can send their bitcoins and then transact on the service with reduced impact on bitcoin's blockchain, where users can withdraw their bitcoins by getting one or more bitcoin transactions confirmed. It is not a second layer if, without changing bitcoin's consensus rules or using a 51% mining attack, a group of one or more third parties, and/or the service itself, can render any user's ability to withdraw invalid.
💬 10 replies

Replies (10)

waxwing13d ago
Interesting. If we think of LN, we have that: not only ability to withdraw, but also ability to maintain currently held funds, passively, can be violated even without 51% attack but merely through censorship by miners, or even pure unavailability or pricing out through fees > available balance. Hence someone put it in some pithy statement that I can't remember along the lines of "in Lightning censorship resistance is a security requirement" (meh I can't remember exactly but you get it). But then is that overlapping with a 51% attack, or not? I always thought of the latter as specifically referring to attempts to "undo" payments, so changing inclusion and/or ordering of txs. I think I'm trying to say that, with this definition, even LN doesn't count as an L2, does it?
0000 sats
Super Testnet13d ago
In my mind, a lightning withdrawal that pays sufficient fees can only be censored if a sufficiently large group of "anti-withdrawal" miners collude to reject it. If the anti-withdrawal miners have less than 99.9% hashrate, then, given that, per the LN protocol, there are 2016 blocks to mine the withdrawal tx, there is a good chance the remaining miners (0.1% or more) will mine it. And at that point, miners have to perform a 51% attack to "undo" it. But I suppose, if you define "merely refusing to mine it" as different from a 51% attack, my definition does allow an edge case where, if 99.999% of hashrate consists of anti-withdrawal miners, then even if they won't perform a 51% attack, you're still unlikely to get your withdrawal transaction mined, because too few miners are "on your side" -- the ones who are, are unlikely to find a block in LN's 2016 justice window. But even in that edge case, I think my definition still works: I carefully chose the phrase "render...invalid" so that it would call to mind transaction validity. Your transaction would not be invalid just because 99.999% of miners refuse to mine it. If the withdrawal transaction(s) remain valid, the service still counts as a layer two, even if most miners refuse to mine it. One might wonder if that also means my definition can be shortened by removing the reference to a 51% attack, since, by most definitions, a transaction is not rendered invalid just because miners attack it with a 51% attack. But I think the reference is still useful, because in the case of lightning, the justice tx competes with the finalization tx to spend the same input, and so, if a 51% attack causes the finalization tx to get sufficient confirmations before the justice tx can get them, then the justice tx is actually rendered invalid -- because it tries to spend an input that has already been spent.
0
Brunswick13d ago
Yes, that is why liquid, as useful as it may be, is not a layer 2, and ecash is not a layer 3. Ecash is a custodial lightning service.
0000 sats
Big Barry Bitcoin13d ago
Where does ark sit on this then? Or statechains?
0000 sats
0
0
0 sats
Super Testnet13d ago
Spark does not qualify as a second layer because a malicious server plus a malicious prior holder can collude to steal the coins any user receives via a swap (which is the common way to receive coins on Spark), if the malicious parties prepare their attack in advance. There is one caveat: if you go through Spark's deposit procedure and do *not* use a swap, the utxos you deposit cannot be stolen from you, because *you* are the only prior holder, so a malicious server can only send them back to *you.* That said, I think Spark built their interface so that swapping in is the only option visible to end users, and only their corporate partners can use the non-swap options. But it's theoretically possible that some people might find a way to access it, e.g. by "becoming" one of their corporate partners, or if they make it available in the future. Ark seems to qualify as a second layer, but only if users use it in a certain way. Ark users have the option to trust the server for the finality of their payments, and both implementations seem to encourage this, especially for mobile users. They encourage this through their UX (which seems to default to "Out Of Round" payments, which trust the server). On a related note, Arkade's LN swap implementation seems to automatically trust the swap provider + the server not to do a chargeback, by revealing the htlc preimage to the swap provider as soon as it gets funded via an Out Of Round payment. It does not seem to allow users the option to wait for the funding tx to confirm in a round first, which means, from what I can see, all inbound LN payments on Arkade are custodial, at least temporarily (i.e. til you refresh your vtxos, which is often several weeks later). It might sound like I am saying contradicting myself, saying Ark qualifies but then pointing out all the ways it doesn't. But the thing is, users have the *option* to use it in a self-custodial manner, even if the devs seem to discourage it. You *can* refuse to consider an inbound payment settled until you refresh that vtxo. And you *can* avoid using their LN swap implementation and just onboard via L1 for now. (Maybe someday a better LN swap implementation will come out that is actually self-custodial.) Since users *can* use Ark self-custodially, I think it technically qualifies as a second layer, but I also think almost no one is really using Ark in a way that qualifies as using a second layer.
0000 sats
Big Barry Bitcoin13d ago
Yeah, when I asked about state chains, I had the old mercury in mind, not spark, but good to know sparks nuances better. But my understanding has been that there was a third party in both of these protocols, so I thought it would fail for that reason, but your answer is more nuanced than I expected, suggesting that they are second layers if used/offered correctly.
0000 sats
Super Testnet13d ago
I don't think Mercury runs their statechain server anymore, but when they did, the first paragraph applied to them too: if they were malicious, and colluded with a malicious prior holder, they could steal payments from someone who received utxos via a swap (Mercury was way ahead of their time -- they had support for LN to Statechain swaps too!). But the second paragraph does not apply quite as much. I personally tested Mercury by doing an onchain deposit, so I know they supported those if you didn't want to do an LN to Statechain swap, because I did one myself. And it was cool knowing that my money, at that point, was still in my self-custody, even though it was now *also* spendable on the statechain. But then I sent it to someone, and some of the magic went away, because I knew, for *that* person, they had different trust assumptions -- specifically, if I was malicious and had colluded with Mercury to prepare an attack in advance, Mercury and I could have stolen my money back from that user. So even Mercury's statechain only counts (counted?) as a second layer in my book if you (1) deposited via L1 and (2) never sent or received statecoins to/from someone else -- which, of course, defeats the purpose.
00
0
0 sats
Big Barry Bitcoin13d ago
Yeah, that was my reasoning too. They addressed it by saying that they used secure enclaves, and that's cool, but it's an implementation detail, not a protocol thing.
0000 sats
Super Testnet13d ago
> They addressed it by saying that they used secure enclaves The problem with using TEEs (Trusted Execution Environments) is all the trust that's involved. Unless you inspect the hardware itself, you don't know if it's been backdoored; and there is open source software that has been used to extract private keys from "unmodified" secure enclaves. So there's just no way to know the hardware is really doing what its operators promise it's doing.
0000 sats
Big Barry Bitcoin13d ago
Yeah, they don't afaik.
0000 sats