Hash Oracle Test Post — Hash Table for BTC:USD, 2020-01-02

in #defi5 years ago (edited)

This is a test post — a dry-run of the the BuildHashTable script from the HTLCProductsSim repo, where we are developing tools for building Hash Oracles for reporting commodity prices or other real-world events. The idea is that hashes are published in advance, along with the conditions for preimage reveal. On the target date, if the conditions are met, then the respective preimages are revealed. The hashes can be used in hash lock-based smart contracts to direct outcomes based on the Oracle's reporting of real-world events. A Hash Oracle is a trusted party — not a trustless one. It depends on humans to accurately assess and report, and reliably publish preimages at the appointed time, and securely hold back the preimages whose conditions are NOT met. However, a good oracle will be invested in building and maintaining a reputation for accuracy and reliability. Although they are not trustless, hash oracles are permissionless, insofar as the hashes and preimages are published on public forums, and anybody can make use of the information.

For some additional context, see also the inaugural post of the DAOStreet Hash Oracle.

Below I will publish the hash table for TODAY's price of BTC in USD. In about an hour, or maybe sooner, I will publish the preimage table. (UPDATE: The preimage table has now been posted here.) Only the hashes up to today's price will be revealed. Those above today's price will NOT be revealed.

Note that this is a TEST, and the root preimage is NOT secure (nor even secret — you'll find it in the source code if you know where to look). Also, ordinarily one would publish the hash tables significantly in advance of the preimage reveal date. But the goal of this test is just to see how everything looks in a published forum, confirm that the preimages and hashes do indeed fit together in the correct way, and solicit any commentary or critiques from the community.

Here we go!

BTC:USD Hash Ladder (200102):

Target Date: Jan 02 2020 (2020-01-02)
Event to Report: Price of BTC as determined on target date.
Reporting Method: Reveal preimages for all hashes for which observed price meets or exceeds hash level.
Determination Method: (Described in detail elsewhere.)
Quote Pair: BTC:USD
Hash Header: d200102:>=:BTC:USD:t32000:f2:s24
Num Hashes: 121 (5 octaves, 24 steps each)
Resolution: 2.93% each hash, or 5.95% every two hashes,...

WARNING: This is an EXPERIMENTAL Hash Oracle. At this point in time, there is NO WARRANTY of any kind, nor any promise or commitment, implied or otherwise, as to the reliability, accuracy, or timeliness of the information in this post or in any future post concomitant to this one.

Begin Table:

PobsPhashThen preimage will reveal for this hash:
>=32000.0034bfc531e345f566e97e9c8c7f915e833fd0ba345e3d88e6b821d7ae233f6c08
>=31089.02b6d1a5c79e2a6af1ad07cec3736c39daeb3420564b27f54f46e455663f5d721c
>=30203.98ef43e20432fcaac351d46744e5ff1f97f25325b8b40c826a74fc7c59a677897e
>=29344.1339a1ed6ae33bb3e67770d7d173df3c576b71d5131a9501252093b9ce71e25ef0
>=28508.765811725e2591d72b78bc81eb37da71475b8b6033a1fcaab7f734781db329a9fe
>=27697.176eacd7d19297cc68ddad00f599134772bdf48f91b161f4873b4c6e6d1e17552a
>=26908.69667648b9459e6569dacbd118d2ebd2b80bbce9ec1a58366de960a186ad785d65
>=26142.65138378403b2152829e15589253534bbaaa077d0488c67f8faadad4fd6992cb30
>=25398.421da4b90e4a00bf8c1200b6e63a65398a779905e26ae112aa2b188192e02e4161
>=24675.379747d8321de87511cf35bbce9879d1a813c7844ed31632df742c8be400c68553
>=23972.91cc1f9cddcc51925d957a6ce24c9d0f6e0bf66a5977b634f7499bd2dffa242bf6
>=23290.45d413947463895c92c6aa3b9e658386ece0abe9e1d17589ee506d5f0987f795b1
>=22627.4210e1027d4c325b2d0a0f066c2e082c7fafe8ba2fd1ec906596c7f204657aa15b
>=21983.26c5d244934e1ef640dce113a4383b0eeda8821a0cfce023fbcd0bccf530f104e0
>=21357.444f4154ce91c4c35b88e45ae7a6cce5aa6725a0eb6db86cfe98d5fc4f87894525
>=20749.432bc6ee2b71cfcb1867dd1a7758439e171a9453c0d0aec2f36bb9f2d7bee33cf6
>=20158.74cc5ca45b19524490d5d321cb09ca360eb570df0492c099e60c4e2c97a68b6ac9
>=19584.86583b498a9cab17c897efbc46ad2dd5cb8ec63b14b5304aa811bb1dfd4f8f76d5
>=19027.316e62f90cecc0bf7035148c4b8c2b26d6dc73d9f3915685c512e54ca282d8feb4
>=18485.6413210838bfe8c1e6faeb5b648fdd28895ad71c297259662a44d79a624ecd92ad
>=17959.397075e469c6756b606e6a92b95edf10fc02fe46673c3d087d02e22cb4a28652f2
>=17448.127e41d018676acf86a778eb42028021f858256c42344b8dbcea6c39169c00c021
>=16951.41ddfb655115ef55e0d27ccbb276334d193aa2c66c36eea5bdc23d98c39c8099e8
>=16468.8432ae22c089349254d8a6e5f3d5a3e4758fbda533ef0951a4e8b49545f6e7339d
>=16000.006e7bf3ef5227203a31f925f356b7eea02422fe2cd9b1813fd02080c49e3dceae
>=15544.5182bd8340ae25c9f8488d2ed74a58b05ee37bd76f5bc69a8bc39dcaee5ad959a1
>=15101.99085f897816bb41116f590961720769386d83a9023275fe697b0f9c95ba75bbbd
>=14672.060342a6eea0085bfb6e57298aad0bce65ad3e4527b04286aaaa25f44c9c79c51c
>=14254.387bc8a55223eef8e4754c7ba861fb7a618aa87a22fb8d2216e62c30d13957223d
>=13848.58d85d06c01503eeb90c9eb71e7f279390ef827d20a4df20e5c2609ceb5869a51d
>=13454.34d71ea45219caba4fb436d0d80296298ca1e0017b126afe07c43aa33beb5bcbfd
>=13071.32f04acccf67bcdadcdb944decfd9b6cd2e1f0ca4f785b37b14fc800b68f979724
>=12699.21ca01483eed8dca2ea6dcacf7821e3ac132c74c3d5392356cff2fa2eec80eef93
>=12337.69364f817d063fe20ef8b35b12b71fba35e9086d518aab19f2ac4c66676ff2bf7d
>=11986.4618ee6fb17a6dbc0d951c43b12238847be2c109159ad402de3df1291ea5e7e90d
>=11645.23e73cf28eba2c599f41ad7ade550069c573d7f009178814d42e89833a942bc050
>=11313.7113fe1a83585f69056e9b5fdb31efb90a1a0e749b91638a2bf49fc8e3219a78f3
>=10991.63021608caa9ab768ba7ecb9aa76357dd42ceb9ac39610b8bd30b65d64b48e1a6f
>=10678.7221a5a7ebfc8aaf6608269467d032914d330cf4ce64d75389e760e325e82f5d42
>=10374.72ba87b4708d7bf1d7703e9f274ee0d05e4fcba0b3ada820ab6622684bb2c718de
>=10079.37f771af7f56871703e7e1f11d14ff68e524f086dbb6984fdf6c3054f46d64bb54
>=9792.43e5b3212eb8d1555a3f7c7077431de9afe95ac553a88a6f78ff462067d2dd3a04
>=9513.661729fce2564c1318b175ea766c8cbea23a69ddea017e8cb717f85adfbbb45aa5
>=9242.82c507f3f15982902999acdae1ca633832c0fe3a47d2ab0f8addec691b849fdfb5
>=8979.702ea6480001f046aea33f81049b7f3d6ba855ee63b9cf247ed792c47edc7c398d
>=8724.0621e71049cc77024443dffab5752fc9086c1f9ca830f6dc47eb819d553d0fb3d5
>=8475.70dcf3b01574dda9fb515966b00b85070978ab788d9a84b6ad280c25ecb052d6e5
>=8234.423fb7d234402e9d113297d3ff6a8dbb381ac83225a75cc94949a6d722a1f76831
>=8000.001abf1592d4991437e201bd0ddecf39af02b236e04c57ed478f513947683e7882
>=7772.26e3792a8da07080514ae1e8d66b978315cefce8150d3098e1d6d59bb713efe1e5
>=7550.99b2d3df1bc85178a20e72e611992a7ad3f20f246c3769cb23736cf1e12471ebe3
>=7336.03ab647c00df50b21170a44d893a229397c9cbbda4e790a054eec3be88aefd4972
>=7127.193a564f64e2a0b74071d9cb62f779e64fb6efeb58d4950227c376aa3081e3b928
>=6924.29cf2903c21ae7542b5b754df7c9ee56565b34f977b556622795062d7d46bd2ec9
>=6727.171433e6e0669912ebc974d078851b8ade5b6608f855a4ab9dd10c855bcb581f08
>=6535.668bb376cf45f28497e51e3d39b9033eab2be785b63959140fb018754393d30dc4
>=6349.60a23a1181dc38cd35e0a0892491ec14bb2868451fbc78a5f335c1f338afab690f
>=6168.84ebb433aa1961fd23e2cdc25be26a815c83f3cf4dfbc64646cfb90e257cc28e86
>=5993.230fdd98e5c0c386f54ee47b55ccb3d7c5936dad778a4836e58de368310f8ec223
>=5822.611b6a3b8fb59fc7692e0aec116e3bacaeed19a2b39108b9b2107789fb99438331
>=5656.85a1aa58e2b41bde4bc655e9718b4eb91eaad569842121c3abf19d206f3c04ab00
>=5495.81f0c791dfc042af28e1d6dd9dd371d2932e54acea3bb980cc7c6df81d0a05fc80
>=5339.363e308724370191ca7c2679da72f761328fc6b2ec3577a3a6e6e6b3d7c4cd5f1f
>=5187.3617dc305e36e786d58a4710278ff9aacff0a9fae7391968df572b2401e4ea2e59
>=5039.6814f043e6dcbeef65eaebcd14da882aa8b7b77518844a2cdd411f61214f7b91ad
>=4896.21d611d6fd8233289ba7392ae10fae65ee7c361ffd60e8b5b3615d5c76804631d5
>=4756.83ff42a1a6634adfcde64dfce185f9ba8fa0cd3a66f662b95db15bfac5e8ae8557
>=4621.4122f2eeadb1bbd13928beef741b231cd923000e2fef8b78d5547a410abd4ff6cb
>=4489.85ce87fbab36f7defc1ada7c76ee43c83fa23eb510d7988b1ece12ad31f800af6d
>=4362.037a5efd567d60a2705e566334a565f084cab9b7dbd1ecccfebea36a481434a48f
>=4237.85a1003d949bce8d9bdfd57eca379b30f32a8ff80e27d6a8b3879e7abc95602a90
>=4117.21d4639ba0e942d6cf57726fa854766745c25533c7608092b513062f3454a63102
>=4000.00d80afa7a678f46b14f35f235abc61200171af7c1548da66c2b227244382cad99
>=3886.13ea1940fe24c19b61f4344e4a514537cd62ed419968603d14c30703b332093a47
>=3775.505cb7dc937ba0b1f9103eb9409bd4c773dcf3b2f4f810938a34065649d798acc4
>=3668.025ebb74e2936d7972eeef2c62f530a27cb6d282aecba70db83fc3c81d8878657f
>=3563.590bdb1b7ccb2959030573e05be7022f2532bf879fe752c3f39e5e05b2c2b7fb38
>=3462.1595f8f71b986707256d8a647b8e8fbe2551f04ca0c6b77918ab0f462fffa3ad52
>=3363.59bd7f3855fba272ed4942ade32b74a55cd61f92220a2c565616474a6c365c6243
>=3267.83c7ebfbd87a618e9138b76479deaf4f803c0a52d640c6c1a220fa942e4f63ca5f
>=3174.800b42d589b4120f96f06e3e0f2433a56d4f24f45068aa0c4b0d6dedf7a7616f37
>=3084.42930a13b344a2c91a30ea80156c62d307cafeebdac62f45ddc6f888ccc492df90
>=2996.6166757be2e7f45fd23741862821147c5068a078925b15676b6e4eb70c94a88443
>=2911.31d5d773c8943d032f1f1a0caa64bc7da945fa587e5961836a0dc4314232c592ed
>=2828.439648f3358e05297f087d9c692eb4e44e4e37b952c434b254d00992330304d680
>=2747.91b2e205f0543f40236fdb419c36fdf192e906ccddb222ab32ccae9be9871ea364
>=2669.6895aa5e8210c62a3b03f51f41eafd5d62ff05bd3020b3e4acbefdfd82d4ea5f21
>=2593.68ad21db7dd2d8972b69705928c9807a04b35cc917b87dfd5732fb42d7cdcce719
>=2519.84e9b9b5c730eae7b06a9606361a5eff6141f11960d7d0b109461b95da00fa48fe
>=2448.112b91d6f5766c890f8bd1348fcd8287bf74da26d123859dfa980c8cc854779c70
>=2378.41374703e517d3cba5f78ab80a7726cf324d1a23098b19d0e761cc42548c32a448
>=2310.71b5e927c6dbe6bf184d9133fad75bef655481ba06a189d640cce77ebbfbd4c9f2
>=2244.92d5edc5788044ac394fd7118aed5d7e115e72ddc71b4bf87a33376fbba4face6e
>=2181.027446aa00670794deee84a559c4163a4b9336b12846cd5f46245bfb36d05fdd13
>=2118.93b0b777f52e2691d041fe5fd6b10356a6459b3e44a3a66e830adf1ae2386ac816
>=2058.60970d3f190fc4b339100dd6dd4d3310490d4031af30f2c93b1f8fe3a2b8161a01
>=2000.00d9dc504ba46a9f9c6bad3b4f1086edf5bd2cfa3ddff5d520f89922be73990469
>=1943.06985cc6f12ae01bcc2f3f106c9ad4120d22ae1719e76a85af4d638369e5bfe50d
>=1887.7530bee45ec2b4026dd41602631de2854ec89aef0dfae6f44747afdd58facfaad9
>=1834.01fcc218ff2678c537855d1fc8f2f0656512085ca5a51b6a9a20173a48e8a4d7bf
>=1781.8076adc575a3a96d3b663759fb01344b109aa0ae052a51de6c44041be887ccd7c0
>=1731.075a357780691ead63fc0ecc5310752fb282e7a7005627260141b94f294af3ba0c
>=1681.79f36bb0b1e87cf907411d0c141bca26fe640cc180da0dbb23b1fb5f96d538a965
>=1633.9280b7479fca0b2231722b05e660aafe8a5d5697b90cb30b6a5dd073310ad2d449
>=1587.4016fa7e7e6d0632bcec19e0cffab9bee7a2a7588cb3fc596f2e44674f78921ced
>=1542.212a9cdf883c421bf321354bbb44b03916a6b0f0d9aa3c1be28213998a90a64f71
>=1498.315daaae56acbb3ddbacf071ef28bd72983b8f11627f99ca625c1fbde24cd96f03
>=1455.656240e5851de2884ab10a201acf459dd63ca893fd98454b49e28f0b7979d75b1a
>=1414.21d2b5c6b6762a27ac820d00a257cef0e23cd6ab104f39daba2c84713b6df34821
>=1373.957f1b358e32627a4c38117b00e5b4cf6ae81289459d221a6e1fdff97025385d7b
>=1334.84f037fa370fb84b0f3d913e8082323fc217b5eef82cca7f163cd5f5915c7c89b4
>=1296.8479c65acc6828a96e352505250602d40db3f6f6609cf734122a7d9854c9671e76
>=1259.92cfac4a80294d6c072647a0a66c58e20f91eabada759b2dcb77a006808e6bd7b5
>=1224.0591fb7aef5311942edff994c6dab8a134813354489008c0b6f636c96b09a3f586
>=1189.216364b6e3fdab5cad8ba51bbe22e3b2ec4c1c23f014aeccb30b94c30ee1bbbd5a
>=1155.353d5f0974acef573cd02ed48737fef9588b60ef5b206f056e7085ffc64ce5464d
>=1122.46432320d101967b743a6b0483ed3f1678556fde6443bbdd069325940c882c7450
>=1090.5124d539cfc0e3b63e187123dccafb525f457e4ec7b9b01f2a4b58d6dab462762a
>=1059.46c59e64243049a6b1bd397c813ccea3bb60ca2a12c383167e8c9166941b942fa8
>=1029.308adade6a75812eed93d7e172f03c25a284588cc3a6040dc5029a20913dcdab85
>=1000.008268dcceb262dc8eb955c0ed2ac63af003af3d6cf96482123e0edf7c7da08e0c

WARNING: This is an EXPERIMENTAL Hash Oracle. At this point in time, there is NO WARRANTY of any kind, nor any promise or commitment, implied or otherwise, as to the reliability, accuracy, or timeliness of the information in this post or in any future post concomitant to this one.