Stellar employs a consensus algorithm called the Stellar Consensus Protocol (SCP), which ensures secure and consistent transaction validation and agreement across the network.