Making Smart Contracts Predict and Scale