create account

HBD stabilizer algorithm by smooth

View this thread on: hive.blogpeakd.comecency.com
· @smooth · (edited)
$71.51
HBD stabilizer algorithm
Although the code is not open source, I have made the exact algorithm used by the stabilizer open source as pseudocode here: https://github.com/iamsmooth/hbdstabilizer

My intent is to update the pseudocode any time the algorithm changes. 

Contributions of improvements to the algorithm are welcome, but will be accepted only if I decide to implement them in the running code.

Contributions of working code that implements the documented algorithm are also welcome, although in this case, if you don't continue to maintain and submit updates to the code as the algorithm changes, the code will be archived.

_100% beneficiary to @hbdstabilizer_
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 247 others
πŸ‘Ž  
properties (23)
authorsmooth
permlinkhbd-stabilizer-algorithm
categoryhbd
json_metadata{"tags":["stabilizer","algorithm","open","source"],"users":["hbdstabilizer"],"links":["https://github.com/iamsmooth/hbdstabilizer"],"app":"hiveblog/0.1","format":"markdown"}
created2021-02-21 01:38:21
last_update2021-02-21 01:43:00
depth0
children13
last_payout2021-02-28 01:38:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value71.506 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length646
author_reputation253,602,537,834,068
root_title"HBD stabilizer algorithm"
beneficiaries
0.
accounthbdstabilizer
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,982,373
net_rshares374,962,990,387,140
author_curate_reward""
vote details (312)
@auliasiddiq ·
Nice posting.  Like it
properties (22)
authorauliasiddiq
permlinkqov32l
categoryhbd
json_metadata{"app":"hiveblog/0.1"}
created2021-02-21 04:28:03
last_update2021-02-21 04:28:03
depth1
children0
last_payout2021-02-28 04:28:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length22
author_reputation898,634,300,698
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,983,987
net_rshares0
@davidmuhammad ·
I love algorithm
πŸ‘Ž  
properties (23)
authordavidmuhammad
permlinkre-smooth-2021221t113358238z
categoryhbd
json_metadata{"tags":["stabilizer","algorithm","open","source"],"app":"ecency/3.0.14-mobile","format":"markdown+html"}
created2021-02-21 04:33:54
last_update2021-02-21 04:33:54
depth1
children0
last_payout2021-02-28 04:33:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length16
author_reputation6,813,184,461,391
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,984,049
net_rshares-5,125,911,036
author_curate_reward""
vote details (1)
@eturnerx ·
$0.22
Thanks for sharing the code. This probably doesn't matter since a 30s cycle is short, but the top-level chain of if-else-ifs look like they should be independent ifs rather than an else-if chain.

As implemented there's a lol-attack here where a malicious actor could spam post every >30s, set the `stabilzer_account` as beneficiary and upvote their spam posts. After a week, the pseudocode above then gets into a loop claiming rewards instead of later actions (stabilising the price). The counter-measures are simple too: either make the else-if chain into independent ifs, or identify the spam accounts and downvote their posts to zero just before payout.

Also, with an else-if chain the exchange price fetch is wasted resources if a reward claim occurs first.

The else-if chain does introduce a bit more randomness in the timing of market actions, but if this was going to be exploited by a market bot then the amount of randomness is probably not significant enough to matter. IE.. after each `stabilizer_account` market action, assume there's 30s to get in whatever the other bot wants to do.

If API node traffic is a concern, then using a finer timer and a step counter with each if clause checked on a different step might be a reasonable solution.

Assuming that API calls are not realtime and are synchronous (at least how the code is written) the cycle isn't going to be 30s. But, I'm aware you know that already and probably it isn't a big enough issue to make the code more complex to fix.
πŸ‘  ,
properties (23)
authoreturnerx
permlinkre-smooth-qovfg9
categoryhbd
json_metadata{"tags":["hbd"],"app":"peakd/2021.01.3"}
created2021-02-21 08:55:21
last_update2021-02-21 08:55:21
depth1
children1
last_payout2021-02-28 08:55:21
cashout_time1969-12-31 23:59:59
total_payout_value0.112 HBD
curator_payout_value0.111 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,504
author_reputation103,695,946,143,660
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,986,462
net_rshares923,614,525,081
author_curate_reward""
vote details (2)
@smooth · (edited)
$0.17
Good feedback. I'll incorporate some of these suggestions in the next update.

The else if chain is intentional, to throttle work done per interval.

The minimum thresholds on things like claims are intended to reduce lol attacks. Someone could do that, but they would have to incur a significant cost each time or it would be ignored (until aggregate threshold is reached).

Correct, I don't care about the exact interval, in fact it should probably be made random. It's just to throttle workload, and also avoid a tight loop in some odd situation where progress isn't made (but 1s would be okay for that too).
πŸ‘  
properties (23)
authorsmooth
permlinkqovgal
categoryhbd
json_metadata{"app":"hiveblog/0.1"}
created2021-02-21 09:13:36
last_update2021-02-21 09:18:39
depth2
children0
last_payout2021-02-28 09:13:36
cashout_time1969-12-31 23:59:59
total_payout_value0.084 HBD
curator_payout_value0.084 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length611
author_reputation253,602,537,834,068
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,986,625
net_rshares708,592,196,108
author_curate_reward""
vote details (1)
@ganjafarmer ·
Excellent work!!!! 
properties (22)
authorganjafarmer
permlinkre-smooth-qow011
categoryhbd
json_metadata{"tags":["hbd"],"app":"peakd/2021.01.3"}
created2021-02-21 16:19:48
last_update2021-02-21 16:19:48
depth1
children0
last_payout2021-02-28 16:19:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation672,900,775,922,025
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,991,691
net_rshares0
@geekgirl ·
$0.09
I would like suggest a small change/correction to make the algorithm even better.

Change this line:
dao_account = β€œhive.fund”
To:
dao_account = β€œgeekgirl”

And it should work flawlessly.
πŸ‘  
properties (23)
authorgeekgirl
permlinkqowfzs
categoryhbd
json_metadata{"app":"hiveblog/0.1"}
created2021-02-21 22:04:42
last_update2021-02-21 22:04:42
depth1
children0
last_payout2021-02-28 22:04:42
cashout_time1969-12-31 23:59:59
total_payout_value0.058 HBD
curator_payout_value0.034 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length187
author_reputation1,588,017,852,468,897
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,996,703
net_rshares439,315,762,983
author_curate_reward""
vote details (1)
@jphamer1 ·
why stabilise something that puts a demand strain onto Hive?
properties (22)
authorjphamer1
permlinkqoviar
categoryhbd
json_metadata{"app":"hiveblog/0.1"}
created2021-02-21 09:56:51
last_update2021-02-21 09:56:51
depth1
children1
last_payout2021-02-28 09:56:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length60
author_reputation13,498,015,589,626
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,987,160
net_rshares0
@onthewayout · (edited)
$0.24
It only puts a demand strain on hive when the price of HBD goes below one dollar. The defective part of HBD is that when the opposite occurs there is no mechanism in the other direction to offset the negative effects.

The way this proposal is setup effectively creates demand for Hive on the internal market and also opportunities for savy traders to arbitrage the price of HBD between the internal market and the exchanges (when it is overvalued).

In order for traders to profit Hive will need to be purshased on the exchanges and then traded for cheap HBD on the internal market. Since the hive obtained by the hbd stabilizer account is sent immediately back to the DAO the cost for the stakeholders is practically zero with the added benefit that it reduces the supply of Hive on the market.
πŸ‘  
properties (23)
authoronthewayout
permlinkre-jphamer1-qowe7e
categoryhbd
json_metadata{"tags":["hbd"],"app":"peakd/2021.01.3"}
created2021-02-21 21:26:06
last_update2021-02-21 21:30:57
depth2
children0
last_payout2021-02-28 21:26:06
cashout_time1969-12-31 23:59:59
total_payout_value0.120 HBD
curator_payout_value0.120 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length796
author_reputation13,205,527,560,619
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,996,148
net_rshares875,322,647,934
author_curate_reward""
vote details (1)
@kingscrown ·
my man!
πŸ‘  
πŸ‘Ž  
properties (23)
authorkingscrown
permlinkqov2tu
categoryhbd
json_metadata{"app":"hiveblog/0.1"}
created2021-02-21 04:22:42
last_update2021-02-21 04:22:42
depth1
children0
last_payout2021-02-28 04:22:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length7
author_reputation2,114,606,667,003,741
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,983,943
net_rshares-1,731,702,960,503
author_curate_reward""
vote details (2)
@marius19 ·
Good morning a beautiful day @smooth  nice posting like it
properties (22)
authormarius19
permlinkqov8e2
categoryhbd
json_metadata{"users":["smooth"],"app":"hiveblog/0.1"}
created2021-02-21 06:22:51
last_update2021-02-21 06:22:51
depth1
children0
last_payout2021-02-28 06:22:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation299,247,955,161,753
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,984,931
net_rshares0
@maxwellelisha19 ·
$0.39
The pseudocode used here is very addressable and interactive
πŸ‘  
properties (23)
authormaxwellelisha19
permlinkqovknc
categoryhbd
json_metadata{"app":"hiveblog/0.1"}
created2021-02-21 10:47:39
last_update2021-02-21 10:47:39
depth1
children0
last_payout2021-02-28 10:47:39
cashout_time1969-12-31 23:59:59
total_payout_value0.194 HBD
curator_payout_value0.194 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length60
author_reputation-606,702,104,679
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,987,728
net_rshares1,508,986,026,527
author_curate_reward""
vote details (1)
@poshbot ·
https://twitter.com/ybanezkim26/status/1367002296811356166
properties (22)
authorposhbot
permlinkre-hbd-stabilizer-algorithm-20210303t064307z
categoryhbd
json_metadata"{"app": "beem/0.24.20"}"
created2021-03-03 06:43:06
last_update2021-03-03 06:43:06
depth1
children0
last_payout2021-03-10 06:43:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation5,554,335,374,496
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id102,157,122
net_rshares0
@zoetech ·
Algorithm is nice as it makes things more real and engaging, thanks for sharing such idea and code
properties (22)
authorzoetech
permlinkqovlyr
categoryhbd
json_metadata{"app":"hiveblog/0.1"}
created2021-02-21 11:16:06
last_update2021-02-21 11:16:06
depth1
children0
last_payout2021-02-28 11:16:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length98
author_reputation290,070,662,825
root_title"HBD stabilizer algorithm"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,988,017
net_rshares0