You are viewing a single comment's thread from:

RE: HERTZ FBA Created!

in #bitshares8 years ago (edited)

Formula refining

X_Period = MOD((CurrentBlock - AssetGenesisBlock),BlocksInPeriod)/BlocksInPeriod

The final division by 'BlocksInPeriod' was initially proposed to reduce the MOD value from xxxx to 0.xxxx, however a better approach would simply be taking the length of the MOD value then moving the decimal place left that many values. This would give a more straightforwards value from the MOD to aply against the reference asset.

Sort:  

Formula refined & Beta price feed script available!

https://github.com/grctest/HERTZ-Price-feed-script/