Quantitative Analysis of Smart Contracts