Modeling Bitcoin Contracts by Timed Automata
a tutorial on uppaal .