Price data #7

Open
opened 1 year ago by duke · 5 comments
duke commented 1 year ago
Owner

The first question is: Do we want SDA to have price data displayed for the current user balance? The old SDA did, but maybe we want to decide on that again.

If we do want price data to be shown, I think it should default to showing price in BTC, which is what SD+SDL do.

We could stop there, and only support BTC prices. The second question is: do we want to support rendering price in a user-selected fiat currency? We should not default to USD/EUR or some other fiat currency, the user should have to select what they want.

If we do want to support user-selected fiat prices, there should be a dropdown option of possibly currencies to support as well as a boolean option to decide if rendering price data should be done. A third question: if we support rendering price data, should it be enabled by default? SDA grabs this data by default, as does SD+SDL. There is a way to disable price feed data in SD+SDL but the old SDA code had no way to disable price data, which I consider a bug.

If we do want to grab price data, I suggest using this exact same URL that is used by SD:

https://api.coingecko.com/api/v3/simple/price?ids=hush&vs_currencies=btc%2Cusd%2Ceur%2Ceth%2Cgbp%2Ccny%2Cjpy%2Cidr%2Crub%2Ccad%2Csgd%2Cchf%2Cinr%2Caud%2Cinr%2Ckrw%2Cthb%2Cnzd%2Czar%2Cvef%2Cxau%2Cxag%2Cvnd%2Csar%2Ctwd%2Caed%2Cars%2Cbdt%2Cbhd%2Cbmd%2Cbrl%2Cclp%2Cczk%2Cdkk%2Chuf%2Cils%2Ckwd%2Clkr%2Cpkr%2Cnok%2Ctry%2Csek%2Cmxn%2Cuah%2Chkd&include_market_cap=true&include_24hr_vol=true&include_24hr_change=true

By using the above, we use a "private information retrieval" technique of requesting all possible data (the above currencies are every currency that was supported by Coingecko when the code was written) and then locally we pick out the data that is wanted. This means that the currency that a user selects to have price data rendered in is not leaked to Coingecko servers.

The first question is: Do we want SDA to have price data displayed for the current user balance? The old SDA did, but maybe we want to decide on that again. If we do want price data to be shown, I think it should default to showing price in BTC, which is what SD+SDL do. We could stop there, and only support BTC prices. The second question is: do we want to support rendering price in a user-selected fiat currency? We should not default to USD/EUR or some other fiat currency, the user should have to select what they want. If we do want to support user-selected fiat prices, there should be a dropdown option of possibly currencies to support as well as a boolean option to decide if rendering price data should be done. A third question: if we support rendering price data, should it be enabled by default? SDA grabs this data by default, as does SD+SDL. There is a way to disable price feed data in SD+SDL but the old SDA code had no way to disable price data, which I consider a bug. If we do want to grab price data, I suggest using this exact same URL that is used by SD: ``` https://api.coingecko.com/api/v3/simple/price?ids=hush&vs_currencies=btc%2Cusd%2Ceur%2Ceth%2Cgbp%2Ccny%2Cjpy%2Cidr%2Crub%2Ccad%2Csgd%2Cchf%2Cinr%2Caud%2Cinr%2Ckrw%2Cthb%2Cnzd%2Czar%2Cvef%2Cxau%2Cxag%2Cvnd%2Csar%2Ctwd%2Caed%2Cars%2Cbdt%2Cbhd%2Cbmd%2Cbrl%2Cclp%2Cczk%2Cdkk%2Chuf%2Cils%2Ckwd%2Clkr%2Cpkr%2Cnok%2Ctry%2Csek%2Cmxn%2Cuah%2Chkd&include_market_cap=true&include_24hr_vol=true&include_24hr_change=true ``` By using the above, we use a "private information retrieval" technique of requesting all possible data (the above currencies are every currency that was supported by Coingecko when the code was written) and then locally we pick out the data that is wanted. This means that the currency that a user selects to have price data rendered in is not leaked to Coingecko servers.
Collaborator

No. 1 HUSH = 1 HUSH.

No. 1 HUSH = 1 HUSH.
Collaborator

Most users will want some form of price data. Let's use the same default as SD/SDL. I also believe users will want to be able to select different fiat prices, so we should include that feature.

Most users will want some form of price data. Let's use the same default as SD/SDL. I also believe users will want to be able to select different fiat prices, so we should include that feature.
fekt commented 1 year ago
Collaborator

I am indifferent but open to whatever users want. Whatever is done, I think should be consistent across all wallets.

I am indifferent but open to whatever users want. Whatever is done, I think should be consistent across all wallets.
duke commented 1 year ago
Poster
Owner

@fekt I agree we should be consistent across SD/SDL/SDA for this feature. I believe it was a mistake to default the price feed to ON in SD+SDL, so I propose that we change the default of SD+SDL to not grab price data unless explicitly turned on by the user. In some geographical locations, just the fact that a computer is talking to coingecko.com is a potentially dangerous metadata leakage. Also, it sucks that if a user wants to turn off the price feed via the GUI, the price feed will most likely be requested before the user figures out how to disable it. It's much better for users who want it to explicitly enable it. That way, only users who opt-in to price feed data have metadata leakage.

I made an issue for each of SD+SDL for this and I will work on them unless somebody else really wants to do it to learn more about SD+SDL internals:

hush/SilentDragon#106

hush/SilentDragonLite#99

@jahway603 with the above 2 issues complete and the same done for SDA, we will have the same defaults across all our wallets, which satisifies the desire for the same default across all our wallets. I also agree many users will want price data and those that do can enable it. It's privacy by default.

@onryo I understand your philosophy of wanting no price data, but it doesn't quite make sense for 2 of our 3 wallets to default it to on and one defaults it to off. I believe that changing the default to OFF in all wallets, plus adding a semi-scary warning modal about metadata leakage is a good compromise. We all know that most users use the defaults and never change them. 1 HUSH = 1 HUSH in all wallets by default and only users who explicitly want price data will have metadata leakage.

@fekt I agree we should be consistent across SD/SDL/SDA for this feature. I believe it was a mistake to default the price feed to ON in SD+SDL, so I propose that we change the default of SD+SDL to not grab price data unless explicitly turned on by the user. In some geographical locations, just the fact that a computer is talking to coingecko.com is a potentially dangerous metadata leakage. Also, it sucks that if a user wants to turn off the price feed via the GUI, the price feed will most likely be requested before the user figures out how to disable it. It's much better for users who want it to explicitly enable it. That way, only users who opt-in to price feed data have metadata leakage. I made an issue for each of SD+SDL for this and I will work on them unless somebody else really wants to do it to learn more about SD+SDL internals: https://git.hush.is/hush/SilentDragon/issues/106 https://git.hush.is/hush/SilentDragonLite/issues/99 @jahway603 with the above 2 issues complete and the same done for SDA, we will have the same defaults across all our wallets, which satisifies the desire for the same default across all our wallets. I also agree many users will want price data and those that do can enable it. It's privacy by default. @onryo I understand your philosophy of wanting no price data, but it doesn't quite make sense for 2 of our 3 wallets to default it to on and one defaults it to off. I believe that changing the default to OFF in all wallets, plus adding a semi-scary warning modal about metadata leakage is a good compromise. We all know that most users use the defaults and never change them. `1 HUSH = 1 HUSH` in all wallets by default and only users who explicitly want price data will have metadata leakage.

I would say yes at least btc but agree with Duke's Alice and Bob scenario of splitting the cost of a shared purchase. A fiat price to make the math easier. how many fiat prices are needed?
Default USD would be easy but clearly we have more users than just Americans.

I would say yes at least btc but agree with Duke's Alice and Bob scenario of splitting the cost of a shared purchase. A fiat price to make the math easier. how many fiat prices are needed? Default USD would be easy but clearly we have more users than just Americans.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.