Proof of Late Work (PLW): addressing the problem of trusted intermediaries in layer 2 solutions
TLDR: Miners on the Bitcoin base layer who build a valid block, which is not included in the blockchain, are ipso facto authorized to be a layer 2 intermediary (server, validator, facilitator, etc). This addresses the problem of choosing who the intermediaries will be, not how the system operates. This is not a layer 2 proposal; it is agnostic, subject to compatibility, of which I am ignorant. This could potentially be used with any type of side-, state-, or other L2 chain, or possibly with a channel system.
Has there been a proposal to somehow utilize the “wasted” energy in mining? I’m not being critical of the mining algorithm itself. I’m referring to the mining that is done by the non-winning miners, those who are “runners up” in creating a block. A very small amount of bitcoin mining hashrate creates a single block; the vast majority of the mining either doesn’t create a block, or doesn’t create a block as quickly as the winning block. Or it is created at the same time, followed by a “playoff" (so to speak), after which the loser is deemed " stale “. Most miners will not have created a block, will accept their competitor’s block, and restart with a fresh mempool, energy wasted.
What if there could be a use for the work done attempting to create a block, or the blocks which are abandoned on stale forks (essentially wasted energy). Imagine being able to harness some of that Proof of Work to benefit the system.
Could the miners be rewarded in another way, for having done nearly as much work as the winning miner? I’m going to call this the “Second Place Miner” (“2PM”) because I don’t know of a proper term for it, and I think that is intuitive to understand.
Could the 2PM, for example, continue building their block after being notified that a block has already been made? They could then complete their block (seconds or minutes later), which will be valid but not part of the blockchain. They then use proof of building this block as proof of work (“late” work), giving them authority to be a second-layer agent (hereafter referred to as “Layer Two Server” or “L2S”, but can refer to operator, validator, facilitator, sequencer, etc).
So the 2PM (Second Place Miner) becomes L2S (Layer 2 Server) on an L2 (Layer 2).
This solves the problem of “just anyone” (permissionless) versus “federation member” or individual entity (permissionful) being able to be the L2S. This way, actual Proof of Work is done, raising the cost of attack to the L2 and doing work on the main chain at the same time. Note again that the block created is not added to the blockchain– its transactions are “invalidated” (so to speak) and are of course returned to the mempool.
This method could be blended with a federation, where the number of 2PM federation members is set by the percentage of malicious federation members required to steal funds. For example, if a federation setup requires 33%+1 malicious members to execute an attack, then 67% of the federation must be 2PM.
Since there are “disputes” (multiple versions of the blockchain when two blocks are created at about the same time) in which the network isn’t 100% decided which chain wins (the “playoff” event), it may be necessary to wait for this to resolve. Therefore we use n-blocks-ago blocks. Say current blockheight B, anyone who has made a valid block from the mempool at B-n, which is not part of the valid Bitcoin blockchain (a “late” block), is given L2S status. There could be a dynamic time window, depending on the need in the L2. So maybe any valid block from B-n up to time duration T.
The block winner (the block added to the Bitcoin blockchain) does not receive L2S status on the L2. This is so that an adversary does not have incentive to attack L2 and finance it with block rewards. They can't both win block reward AND gain a position to attack the L2.
One question is the “how" of implementing this without a central authority “registering" or ”authorizing". I'm imagining the miner being able to use their created block containing their public key as well as their private key to give themselves permission, or a kind of proof of identity which can be affirmed by other servers in the L2 and ultimately the users. If they don't have this identity, no one will use them. The timestamp of the original block they mined to qualify could also be used to set a time limit on their authority. This would also allow for bootstrapping, as the initial L2Ss would “expire” as 2PMs earn L2S status.
In an ideal world, incentives on the L2 would be matched to Bitcoin ideals, probably with dynamic fees (user-selected fees are probably not appropriate, to optimize speed and UX). If fees go up, more miners are incentivized to attempt to become an L2S, and the PLW system could allow more L2Ss by expanding the time window in which PLW blocks are accepted.
Incentive changes: -> more people would mine, because there is more profit (NO increase in mining reward! Just the possibility of fees on the L2) -> miners may not immediately abandon their attempts at a block when another miner finds a block, thus lowering the number of miners working on the newest version of the mempool. -> adversary attempting to mine BTC “just” to get the L2S status would need nearly as much hashing power as the block winner. Attempting to build up an attack on the L2 REQUIRES doing the work of the main chain, strengthening the Bitcoin network (or being very costly).
Drawbacks:
  • the “winners” who become L2S on the L2 are most likely to be those who have enough resources to build blocks on the main chain. Wealth begets wealth, which leads to centralization. The claim that “anyone" can be a validator is only superficially true; nonetheless, it is arguably more egalitarian and decentralized than a federation or centralized authority.
  • depending on implementation, a market potentially emerges to buy and sell L2S status. An adversary to the L2 could buy their way in without mining. However, this would reward miners, and still increase the cost of attacking the L2.
  • potential for L2S status to be tokenized and susceptible to shitcoinomics.
  • it is not clear that miners are correctly incentivized under all conditions. Expansion of the L2 may reduce on-chain transactions, lowering fees for miners (but if it expands adoption, then fees go back up).
Alternate name: PLEBS : Proof of Losers Expanding Bitcoin Scaling
I'm just a monkey with a keyboard; surely this contains glaring problems in incentives and mechanism, and makes assumptions to JuSt UsE cRyPtOgRaPhY. It was probably brought up and dumped for OBVIOUS reasons ten years ago.
So go ahead and let me have it.
How do you determine who the real 2PM is? What happens if at time=0 miner A has the best 2nd place block, but then at time=1 miner B shows up with a better 2nd place block? It should go to miner B, perhaps, but what's stopping miner C from continuing to mine a better 2nd place block and so on? Bitcoin solves this by choosing the chain tip with the most cumulative work. It seems like your scheme lacks this accumulation aspect though and I think the devil is ultimately in this paragraph:
Since there are “disputes” (multiple versions of the blockchain when two blocks are created at about the same time) in which the network isn’t 100% decided which chain wins (the “playoff” event), it may be necessary to wait for this to resolve. Therefore we use n-blocks-ago blocks. Say current blockheight B, anyone who has made a valid block from the mempool at B-n, which is not part of the valid Bitcoin blockchain (a “late” block), is given L2S status. There could be a dynamic time window, depending on the need in the L2. So maybe any valid block from B-n up to time duration T.
Rather than solving the dispute, I think this might create a more complicated dispute resolution process that similarly doesn't resolve. If we have a dispute at blockheight B, what's special about B-n such that it doesn't have suffer from disputes? Also, this implies the use of an agreed clock time which is not something available in a decentralized system (it's a consensus problem itself).

While what you're proposing is quite different, it's reminiscent of merged mining in that it's another revenue stream to miners for work they'd perform regardless. I've seen people (try to) make the argument that such revenue streams adversely affect bitcoin's mining incentives and undermine its security. Also that these side chains are insecure given that side miners have more incentive to act maliciously given the revenue is a bonus on work they're already doing, ie they might gamble their free dessert to earn another entre.
reply
470 sats \ 3 replies \ @joda OP 3 Feb
In terms of the timing, I think there is no "best" 2nd place block, just a "first" "2nd place block"-- and in the case where you would assume a runoff between them, the protocol could just give the L2S status to BOTH. It's probably not tragic, since they both did (very nearly) the same work. We could assume there are many, many L2Ss operating on the L2. Or they could "split" the status, with each being allowed half the time as an L2S, or given a lower priority or volume.
Likewise with "disputes"-- it just isn't that imperative that there "can be only one". What I was considering with the "B-n" idea is that we could wait 6 blocks (or whatever), to be sure of the "real" blockchain, then if someone can show that 6 blocks ago they created a valid block in some given period of time, they are given L2S status. Depending on the needs of the L2, it could be that anyone who completes a valid block with the mempool from 6 blocks ago, within (say) 15 minutes, can be an L2S. If the first valid block is added to the blockchain, many/most miners will not keep mining to get the L2S status; they will just give up their block and start fresh from the mempool.
I don't know how exactly the clock time issue would be dealt with, but I think you can prove you built a block an hour ago because you pushed it to the network then (an hour ago), and it contains the mempool from an hour (plus 10 minutes) ago. I don't know if that answers your question, or if it even works.
I would want to be careful of dramatic changes to mining, since it is now an expensive affair. But given how low the interest is in L2s, and that the software would have to be changed, I would anticipate nothing but a very gradual transition to adoption, with only marginal incentive changes. The fallback protocol is obvious, so the risk seems low.
I agree about the insecurity of side chains-- that's precisely why I've been thinking about this stuff. It's so frustrating to hear and read about the various accessory chains to Bitcoin, only to find out they are a shitcoin, with a pre-mine, and shills in the Youtube comments. Or that they are run by a federation of US-based corporations, or only have a one-way peg, or require compounding liquidity for every transaction. Or, or, or...
reply
Depending on the needs of the L2, it could be that anyone who completes a valid block with the mempool from 6 blocks ago, within (say) 15 minutes, can be an L2S.
I can construct a valid block with no work, so I think you'd need to figure out how to create PoW threshold on L2S blocks.
If the first valid block is added to the blockchain, many/most miners will not keep mining to get the L2S status; they will just give up their block and start fresh from the mempool.
If earning L2S status is desirable, many miners will do it. If it isn't desirable, why would anyone? I think you want to design such a system with incentives for participation.
I think you can prove you built a block an hour ago because you pushed it to the network then (an hour ago).
Anyone that received the block an hour ago knows it's at least an hour old, but anyone who didn't receive the block an hour ago can't prove it's an hour old regardless of the transactions it contains.
reply
195 sats \ 1 reply \ @joda OP 3 Feb
threshold-- yes.
I think any non-tokenized L2 will be fee-based, so the fees will incentivize participation. But only progressive miners will run such software in the beginning, and fees will be need to be balanced such that they are as low as possible for the users while still incentivizing participation among miners. If the fees start low, then few miners will care; if fees start high, then users won't care. So I imagine dynamic fees controlled by the market will be appropriate. And with good network effects, even low fees can be profitable if there is enough volume. Right now, Lightning is practically unprofitable, right? I don't know anyone running a node who makes any real money from it; it's always a passion project. But a miner could subsidize their costs and diversify (and possibly stabilize) their income by participating in L2.
I think you are probably right about the clock time issue; I was imagining looking at the transactions in the block to compare to ones that were in the mempool at each of the following blocks, but that is misguided because in the adversarial condition, the cheater would just use the old mempool to create a block. Perhaps instead of sending the block to other miners, the block could be sent to all L2Ss, at the time of creation. Barring that, maybe we would have to use the current/recent block, and just deal with the conflict in a different way.
reply
Actually, with regards to the timing issue, maybe the miner could publish a hash of their block inside a transaction. Then it is at least in the mempool if not a block (and "everyone" would know when it entered "the" mempool). I don't actually know how many transactions are in any given mempool...
reply
I'm either too smart or too dumb for this. the miner with a valid block which is not included in the chain is either not a valid block, or a temporary chain split that will be automatically resolved in the next 1-2 blocks. This is be design and there is nothing to discuss here;)
reply
blocks can be "valid" but if they aren't the first valid block you receive, they don't get added to your copy of the blockchain.
reply
10 sats \ 1 reply \ @kevin 3 Feb
Could the 2PM, for example, continue building their block after being notified that a block has already been made? They could then complete their block (seconds or minutes later), which will be valid but not part of the blockchain. They then use proof of building this block as proof of work (“late” work), giving them authority to be a second-layer agent (hereafter referred to as “Layer Two Server” or “L2S”, but can refer to operator, validator, facilitator, sequencer, etc).
I think this shows a quite fundamental misunderstanding of what is actually happening during mining. A miner is just guessing random numbers, there's no specific work involved other than constructing the block (which is trivial).
For a miner, the chance of finding a block is the same 10 seconds after a new block has been found or 50 minutes after a block has been found. You can't know who the second best miner is. No sane miner would continue building on a stale branch since they would be losing out on revenue.
reply
I'm sure I have fundamental misunderstandings but also I have a different way of looking at this math:
For any given miner, the chance of finding a block is the same 10 seconds after a new block or 50 minutes later (you are right). However, for ALL miners, some miner would complete a "late" or "second" valid block very quickly. Then once that second (what I'm calling "late") block is found and announced, everyone could go back to looking for the next block.
In reality, this would be opt-in, so not all miners would play this game. Miners who don't would be more likely to win the next block prize, but forego any chance of earning fees in the L2. And those who do participate would be less likely to win the next block (though not impossible), but would potentially earn fees on the L2.
I don't think the value proposition is absent; what they would get if they "win" is the status of earning fees on the L2. These fees would likely be dynamic, so if few miners were early adopters, they would make the highest fees. It would also smooth out their income (of course, most mining is pooled anyway, but this could smooth out the revenue for the pool operator).
I know this is abstract because it isn't a proposal for a specific L2, and would depend entirely on the incentive structure therein.
I also failed to make clear that running an L2S to gain fees would require minimal computation power and wouldn't reduce the miner's ability to mine as usual (they would be doing both). In fact, it's really stupid of me to not point that out from the onset.
reply