Using state channels for scalable smart contracts