townforge.net/_posts/2024-01-13-proof-of-settlement.md
2024-01-13 13:19:22 +00:00

3.2 KiB

layout author
post moneromooo

I have been recently reminded of an attack vector on merge mining: the first major Monero mining pool to implement merge mining will inevitably command a lot more than 51% of the Townforge hash rate, leading to trivial attacks on the Townforge blockchain. Unfortunately, it is exceedingly unlikely that most Monero pools will merge mine Townforge from the start, so the hash rate distribution will be much worse than Monero's, at least in the beginning.

The possible fixes for this that aren't centralized are... well, they're basically variations of having more than one PoW algorithm. A Monero pool with more than 51% of the Townforge hash rate could attack the Townforge chain without risking their Monero block rewards, so adding a second PoW algorithm means that pool could not also mine this PoW without redirecting some of their hash power to that other PoW, which would then not hash for Monero, thereby losing some of their Monero income.

This is something I knew about, and yet I forgot about it years ago. This had been discussed for Tari at the time. Thankfully I joined the Tari channels recently, hoping to catch some merge mining discussion now that sech1 is adding merge mining to p2pool. This is where a reference to that issue came up and woke me up again about this issue.

Now, adding another PoW is a perfectly valid solution, but I also had this old nice-to-have feature: PoS. For a long time (there is even an old FAQ saying this might happen at some point), I'd been toying with the idea of having a PoW/PoS hybrid system. Mostly because it was an interesting tech thing to do, which is basically what Townforge is about :P But I had forgot along the years that it was also a defense against that attack vector.

So I'm now investigating this, and it is likely the Townforge mainnet will include that PoW/PoS hybrid system. The PoS part will not be a straightforward one where outputs are staked. Instead, buildings will be used as the stakes. This is to avoid an unfortunate state where staking gold could prove more lucrative than using that gold in game. This would mean people avoid actually playing the game to stake instead (thanks rucknium for pointing out this possibility). Therefore, since buildings form the main Townforge economic pillar, they will be used for this. The more and larger buildings you have, the more likely you will be to find a PoS block.

One consequence of this is that PoS will only be pseudonymous: one will always know which in game player found a PoS block. So PoS will not be protected by the usual Monero style privacy layers (though of course one can then withdraw that gold and get that protection).

This is not a small change. There are various details to sort out, code to write, tests to perform, so this will push mainnet yet again.

As a tongue in cheek nod to the proliferation of proof-of-X names that were all the rage a few years ago, since it's not quite proof of stake, I'll call it proof of settlement. It keeps the acronym while making it clear the stakes are based on settled in-game land. Maybe I'll even stick to it.

Feel free to pop in #townforge on irc.libera.chat, or there is now a Matrix room relaying to/from it at #townforge:matrix.org.