How does a staking machine work?