We can think of this as a process that could be done outside the node. You would query the RPC for the votes on a block, then accumulate the total weight on it. Based on the weight, you decide if it's confirmed or not.
It would be a function of:
- The votes received
- The online voting weight on the network
- The desired quorum
Available weight this is basically the available supply and excluding how much Nano has been burned. We only know for sure about amounts sent to the "default" burn address. This is around 133 million.
Online weight not all online weight is assigned to principal representatives (101 million out of 102 million, close enough).
In the node we use the online weight, not total available weight, otherwise it would take more votes than necessary to confirm a block. We only need 50%+1 of the currently voting weight, and this is tracked by listening to votes and marking that weight as online. Every 10 minutes we sample the weight, and what we effectively use in the end is a trended value over 2 weeks to avoid jumps (e.g., if a representative is offline for maintenance).
So, in the node we confirm a block if 50% of the trended online weight has voted for our block. Currently, this is 101 million from PRs, let's round that to 100 million.
Normally, we then only need 51 million weight on a block to confirm it. There are 2 scenarios that complicate this:
Suddenly, a large PR goes offline. If 10 million of the 100 million online goes suddenly offline, our trended online value remains around 100 million for a while. Therefore, we still require 50 million on a block, but now only 90 million are available. If a total of 50 million goes offline, then you have no confirmations until the trended value is adjusted. If you increase the required quorum (e.g., 90%), then confirmations stall earlier. Stall resistance is seen here: https://repnode.org/representatives/resistance
Suddenly, a large PR comes online. A PR with 30 million weight was offline for a long time and now comes back online. The trended value is still 100 million, but there are 130 million going around. If this new representative is malicious, then you are only "protected" by another 20 million. With an increased required quorum (e.g. 90%), you are more protected, but if more than 10% (in that case) is voting maliciously, then you might not see confirmations either.
In the end, we also have a minimum online weight to prevent edge cases and protect the nodes, and in all scenarios, it takes a large amount of weight to vote maliciously to create a problem.