Designing smart-contract based auctions