HERTZ - Haskell price feed script update

in #beyondbitcoin3 years ago (edited)

What is HERTZ?

Hertz is a Formula Based Asset (FBA) which is pegged against the [USD|CNY] and modified to oscillate between rising the price feed and decreasing it in a predictable manner, thus we create phases of buying and selling pressure constantly back and forth forever.

What is new?

I have created a simplified version of the Haskell HERTZ price feed script. (Compare against previous script)

This script does not:

  • Scrape Cryptofresh for asset values
  • Handle JSON data
  • Output to CSV
  • Use the turtle library.

The script runs from the command line and takes 5 arguments:

./min_hertz.hs referenceBlock genesisBlock blocksInPeriod amplitude referenceAssetValue
example: ./min_hertz.hs 50 1 100 0.5 25
output: 25.784882

Since you can now enter values easily from the command line as arguments, it will be easier for everyone to test out their own hertz configurations (different frequencies, amplitudes and backing assets).

Any suggestions?

I'd love to hear your thoughts on this topic!


  • Get python price feed script support (Wackao & Xeroc)
  • Reduce price feed publishing fees (to encourage/enable high frequency feed updates)
  • Draw attention to the HERTZ Bitsharestalk thread!
  • Enable selecting different types of wave functions.
  • Run experiments within the Bitshares testnet (or a private testnet) to:
    • Test the smartcoin settings
    • Make sure that blackswan events do not occur throughout the oscillation
      • If someone creates the token at the top and holds an entire cycle, what happens to them?
      • At the top of an oscillation, everyone will be trying to settle their balance for maximum profit - what happens if the majority of holders do so in a vert short time period? Would this trigger a black swan?
  • Decide between USD and CNY for the reference asset (have your say in the poll!)
  • Eventually get witness price feed publishing support!

Inspirational GIFs

  • Rather than a simple sin wave, we could have a sin wave with a period on the way down where the asset would be equal to the backing asset for about a week?
  • What do you think about the use of Fourier series? https://en.wikipedia.org/wiki/Fourier_series
  • Think wave interference would be simpler? Combining a triangle/sawtooth wave with a sin wave to get the above desired effect?

  • We could implement any kind of wave if you can implement it within python or haskel!
  • The middle wave above could be implemented by implementing a price feed limit at certain ranges of x and increasing the Amplitude value to 0.75 to maintain a peak of 0.5 change.

Relevant links

Past Steemit post
Bitsharestalk thread
Cryptofresh link
Openledger link


Wackao responded to the Github Issue: https://github.com/wackou/bts_tools/issues/24#issuecomment-306741609
"Thanks for the suggestion, I like the idea! Not sure if it's going to be useful (don't have enough understanding of economics yet), but just the fact that we are able to try things like that on BitShares is plain awesome.
A bit busy with the launch of PeerPlays right now, but I'll give it a try soon :)"