Python

Bitcoin beacon: using the blockchain to generate random bits

Random beacons

A random beacon is “a trusted service that broadcasts fresh random numbers at regular intervals”. Random beacons are useful in situations that demand security against manipulation, e.g. choosing precincts to audit after an election. Several beacon services currently exist, notably Random.org and the NIST beacon, however there are several advantages to using the Bitcoin blockchain as a source of randomness:

  • Publicly verifiable
    • Bitcoin blocks are public as soon as they are mined so anyone can perform and verify the beacon computations.
  • No trusted parties
    • Using proprietary services requires that you trust the operator of that service. In the case of random.org, they publicly state that they buffer their random numbers1, i.e. they generate the numbers before they are requested. This means that they could be in a position to profit from advance knowledge of the beacon output. Analogously, NIST previously promoted the Dual_EC_DRBG standard, which it has now admitted contained a backdoor for the NSA to exploit. Additionally, the NIST beacon was offline during the 2013 US Government shutdown.
  • Precise security guarantees
    • Due to the cryptographic structure of the Bitcoin blockchain and its use as a currency, it is possible to concretely analyze the entropy generated and the the monetary cost of compromising the beacon output.

In their paper, On Bitcoin as a public randomness source2, Joseph Bonneau, Jeremy Clark, and Steven Goldfeder provide such a construction and analysis. Specifically, they conclude that

Creating a Steem bot using Python, Piston, and Heroku

Steem for the people

When someone writes a great post on Reddit that goes viral and is widely shared, the party that benefits most is Reddit itself. Realizing this and wanting to give back to the community responsible for its success, Reddit toyed with the idea of giving shares of the company to users in the form of a cryptocurrency. This plan was later put on indefinite hold.

Steem is the embodiment of what Reddit wanted to achieve – a blockchain-based, social news platform where posters and upvoters, i.e. “curators”, are rewarded directly with cryptocurrency (actually three currencies: STEEM, Steem Power, and Steem Dollars). I was first exposed to Steem via Steemit, a website built on top of the Steem blockchain. My first thought after learning about Steemit and reading the white paper was “wouldn’t it be neat if I could write a bot that would ‘curate’, upvote posts for me, and make me rich overnight?” Of course, it wasn’t that easy, but at least no one can say I didn’t try to get rich quick.