SoK: Unraveling bitcoin smart contracts