If you've been following recent Cardano staking discussions then you've probably seen or heard the term adversarial staking pool.
What does it mean, exactly, to be an adversarial staking pool?
FROG lost our block tonight due to an adversarial quad fork (LION) 2 min before go time
I've been up 22 hrs making sure we would be perfect. We know we're at a critical point. We know we need to perform - I'm sorry
FROG is up to 3.1M stake so we should start seeing more blocks
— ₳DAFrog - FROG - Cardano stake pool - ADA ステークプール (@ADAFrog_Pool) January 13, 2020
Sounds like something bad, doesn't it?
Well it's not exactly bad and in this article I'd like to take a look at why these players are important for a truly decentralized project to succeed.
An adversarial staking pool is essentially "the devil's advocate" in a testing context.
While a regular pool is trying to optimize its parameters to obtain the best performance possible, adversarial pools are actively trying to subvert the system in order to obtain an advantage.
Several attack vectors exist and testnet pools cannot predict every type of exploit that will be tested. Testing is hard and the development team is actively monitoring all these attacks to close as many as possible before the release of mainnet.
As with all security-related research, there is no guarantee that an attacker has found a vulnerability and hasn't publicized it yet. E.g. they could be waiting for the mainnet launch to deploy the attack on a much larger financial value. But the incentivized net is designed such that rewards are real ADA, and therefore real money. So attackers have an incentive to use their attack vectors now and try to profit from it while the testnet is active.
That's what decentralization is all about: pools have an incentive to try and break the system! It's ok to do so on a testnet. It's desirable, even.
In PoW mining the greatest known issue is the infamous 51% attack. In this kind of attack someone attempts to obtain a majority Proof of Work hashing power, solves and inserts their own block at the tip of the chain. Since they dominate over half the hashpower, it is likely the attacker will be able to build the longest chain.
In PoS there's something similar called an adversarial fork.
There is a consensus around a certain Cardano blockchain, usually the longest chain. One adversarial node then solves and mints their own block and attempts to draw other staking pools into its newly formed chain, which took a rogue "detour" from the previously longest chain by inserting a block that wasn't verified by others.
If this adversarial node is able to "convince" enough nodes to join they new longest chain, then they've successfully forked Cardano ADA and the rogue block they inserted will remain in the blockchain forever. In this scenario the adversary has won.
For instance, block 95302 in Epoch 30 had 87 rogue fork attempts: a new record! It was an active attack on the Cardano testnet happening live as I typed this text!
At the time of this writing pools LION, LION4 and HEX were the biggest sources of forks.
Competitive forks are not rogue events.
In fact, the Ouroboros protocol predicts these and reaches a consensus using different criteria than just the longest chain.
A competitive fork happens when more than one pool correctly solves a block at the tip of the chain (same height). Then we have more than one chain with a length greater than the last one. Should the nodes continue working on their own longest chain (which would be 100% valid), Cardano would end up with multiple chains across the network.
For details on competitive forks, see the Ouroboros white paper (link in references section) or watch the following explanatory video from IOHK:
the number of "cheating" pools is increasing instead of decreasing, that's really sad! #sobit #radar #0nn #stake - you are harming the network for purely selfish reasons! #cardano #ada $ada pic.twitter.com/lcCJ2Hbb7n
— Wunderbaer | #HRMS #HRMA Stakepool 🇩🇪 (@Wiiinnie) January 13, 2020
Aren't adversarial pools essentially cheaters? Well, ethically yes, they are trying to cheat.
But that's not how adversaries are supposed to be seen from a decentralized systems engineering point of view!
Decentralized systems must be trustless.
That is, cheaters are supposed to be unable to profit by bypassing the protocol because the protocol is well engineered, not because the community trusts them not to try.
Therefore, adversarial pools are supposed to be welcome on a decentralized system. Especially a testnet! In fact, this is exactly what testnets are for. Hopefully every conceivable way to subvert the system will show up during testnet operation and not when the system goes live.
This is why Cardano used real ADA rewards for the testnet (incentivized testing), so real greed and real techniques can be tried now rather than in the future.
In the meantime the community has been debating about what, if anything, should be done by Cardano admins regarding adversarial pools:
How should Cardano pool operators deal with adversarial nodes causing forks?
— Rick McCracken - DIGI (@RichardMcCrackn) January 12, 2020
Of course, the only decentralized answer is : fix the protocol to deflect the adversarial techniques being employed!
Pool Health Monitor - View forks and number of adversarial events.
X-avax1rlsj0xgvu85awrvkvjlvlqq37q8hmaq2rsraxz. Thank you! ❤