Secure Bitcoin price feed based on TLS-N proofs.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


BTCPriceFeed is a smart contract that acts as a trusted source for the BTC-USD price. It makes use of TLS-N proofs for the API of (

The usage is as follows:

  1. A user wants to securely use the BTC-USD price at time T (e.g. 1483228800, i.e. Jan 1st 2017).
  2. The user generates a TLS-N proof for time T using URL . This can for example be done through the TLS-N website: (
  3. The user sends the proof to BTCPriceFeed in an Ethereum transaction.
  4. BTCPriceFeed verifies that the proof is valid and the data source is correct. Afterwards the price is stored.
  5. Using the getPrice() function of BTCPriceFeed the user now has secure access to the BTC-USD price at time T.

Ropsten Deployment

BTCPriceFeed is deployed on Ropsten (the Ethereum test network) at the address 0x8b09153430106169626df6e533590bc7062078cb. Multiple bitcoin prices, such as the prices for August 1st 2017 (timestamp = 1501545600) are already inserted (Example Transaction) and can be queried. More prices can be inserted as described above.


  • Note, that due to the functionality of the API, T has to refer to the beginning or end of a day.
  • Note, that as currently does not support TLS-N, the contract checks for the use of the proxy.
  • This is a prototype, with no correctness guarantees.