How will Hivemind handle NAIs when SMTs come out? by imwatsi

View this thread on steempeak.com
· @imwatsi ·
$5.61
How will Hivemind handle NAIs when SMTs come out?
I was studying `utils.normalize.parse_amount()` and saw that it handles NAI inputs but checks them against a CONSTANT that currently hosts mappings to `STEEM`, `SBD` and `VESTS` NAIs.

Will there be changes to how token symbols are stored in the DB? Currently, it's the actual symbol that's stored. Will this change to NAIs? Or will there be a common registry that Hivemind will pull from in the future?
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 17 others
👎  
properties (23)
post_id82,226,316
authorimwatsi
permlinkhow-will-hivemind-handle-nais-when-smts-come-out
categoryhive-128612
json_metadata{"tags":["hivemind","nai","smt"],"app":"steemit\/0.2","format":"markdown"}
created2019-12-02 17:06:54
last_update2019-12-02 17:06:54
depth0
children4
net_rshares20,211,408,210,816
last_payout2019-12-09 17:06:54
cashout_time1969-12-31 23:59:59
total_payout_value2.810 SBD
curator_payout_value2.803 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length403
author_reputation47,375,690,794,265
root_title"How will Hivemind handle NAIs when SMTs come out?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (82)
@inertia ·
There's mention of a directory for NAIs in the whitepaper, but I'm not aware of implementation, yet:

https://github.com/steemit/smt-whitepaper/blob/master/smt-manual/manual.md#numerical-asset-identifiers
👍  
properties (23)
post_id82,227,054
authorinertia
permlinkq1wb33
categoryhive-128612
json_metadata{"links":["https:\/\/github.com\/steemit\/smt-whitepaper\/blob\/master\/smt-manual\/manual.md#numerical-asset-identifiers"],"app":"steemit\/0.2"}
created2019-12-02 17:25:51
last_update2019-12-02 17:25:51
depth1
children1
net_rshares7,200,468,093
last_payout2019-12-09 17:25:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length204
author_reputation227,335,189,892,062
root_title"How will Hivemind handle NAIs when SMTs come out?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@imwatsi ·
Thanks @inertia. I gave it a read and it makes more sense now :)

What made me ask this is that Native Ads will allow a community to set what token it accepts for ad payments. I'm thinking of storing that primarily as NAIs and then have the current Hivemind logic translate that to symbols for UIs when:

1) it scans blocks for payments
2) it parses bids

This means payments can be verified to be of the correct NAI at a blockchain level (NAI found in transactions versus the NAI setting for that community)
properties (22)
post_id82,228,696
authorimwatsi
permlinkq1wd23
categoryhive-128612
json_metadata{"users":["inertia"],"app":"steemit\/0.2"}
created2019-12-02 18:08:30
last_update2019-12-02 18:08:30
depth2
children0
net_rshares0
last_payout2019-12-09 18:08:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length508
author_reputation47,375,690,794,265
root_title"How will Hivemind handle NAIs when SMTs come out?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@test-safari ·
`parse_amount` will need to handle arbitrary NAIs. I'm not sure yet about name mapping, but mapping a community to an NAI could simply be done by adding a new community property.
👍  
properties (23)
post_id82,253,727
authortest-safari
permlinkq1y13b
categoryhive-128612
json_metadata{"app":"steemit\/0.2"}
created2019-12-03 15:45:27
last_update2019-12-03 15:45:27
depth1
children1
net_rshares7,200,468,093
last_payout2019-12-10 15:45:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length178
author_reputation1,423,420,883,864
root_title"How will Hivemind handle NAIs when SMTs come out?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@imwatsi ·
Cool :)
properties (22)
post_id82,270,941
authorimwatsi
permlinkq1zbsa
categoryhive-128612
json_metadata{"app":"steemit\/0.2"}
created2019-12-04 08:33:48
last_update2019-12-04 08:33:48
depth2
children0
net_rshares0
last_payout2019-12-11 08:33:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length7
author_reputation47,375,690,794,265
root_title"How will Hivemind handle NAIs when SMTs come out?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000