Transactions are near-instantaneous in Stellar because of the Stellar Consensus Protocol.
How exactly do the nodes verify transactions and check them with each other? Can a malicious node hurt the network?
Stellar Stack Exchange is a question and answer site for developers and users of Stellar and the Stellar Distributed Exchange. It only takes a minute to sign up.
Sign up to join this communityThe developer guide has a link to a Medium post that details how it works using a lunch analogy that does it's best to explain this quite complicated topic. You can read it in full here https://medium.com/a-stellar-journey/on-worldwide-consensus-359e9eb3e949
The ELI5 version is that the individual nodes rely on peer pressure from trusted nodes to come to a decision. So, for example, Stellar runs a node that is super well trusted and I run a node that is moderately well trusted. I calculate that a certain transaction comes to state X but I admit it could come to Y. Stellar says it could come to Y but could never come to X. Thus I'll change my vote to be for state Y and we'll come to a 'consensus'.
As for a malicious node hurting the network I'll say that anything is possible but it's highly unlikely. If a node is constantly wrong it will be distrusted and the rest of the nodes wont care about what it voted for, it's befouled and it doesn't need to be a part of a vote for X or Y to reach a consensus.
A technical talk by the author of the Stellar whitepaper is available here. In it he goes over the possibility of malicious nodes @33m5s.
He does it better justice than I ever could.