Fun with bitcoin smart contracts