An insurance for smart contracts