The dynamics towards consensus in decentralised systems is fundamental for their correct functioning. Our group has built expertise in the analysis and modelling of consensus protocols by studying the information flow in the verification networks. We introduced a minimalist stochastic model of consensus in blockchain-based systems in distributed, structured networks. This model can be indistinctly applied to Proof-of-Work (PoW) and Proof-of-Stake (PoS) systems. We show that the distribution block creation (hashing power or stakes) plays a crucial role in the quality and robustness of the consensus. This model also allows us to study the non-trivial relationship between inter-block time, network topology and bandwidth, and block size (and therefore transaction throughput). We extended this model to take into account selfish and mining behaviour of some participants, finding an extended range of profitability for this strategy. Prior research by our group, we introduced statistical methods to detect selfish and cartel mining (or - at least - proof of unfairness in PoW mining). Our conclusive results find support for the existence of these behaviours in multiple systems.