-
Notifications
You must be signed in to change notification settings - Fork 195
Add approximate price in USD (or EUR) #36
Comments
@wanderingstan I'll take this. |
Would Origin emphasize cryptocurrency or real world currency more to customers at launch? The emphasized currency might be displayed in a more pronounced way, IE: vs. |
Great question. Showing prices in fiat seems way more friendly to me. A few things we need to keep in mind though:
We should always have an ETH price. A fiat equivalent may or may not be available depending on whether we know the users location and the local conversion rate. |
Ideally we'd use an on chain oracle to pull the exchange rates. It gives the user more privacy, since they aren't sending requests to a random API owned by someone else. One example of such an onchain oracle is this one, from the Dai Stablecoin, that averages 13 other ETH/USD oracles https://makerdao.com/feeds/#0x729d19f657bd0614b4985cf1d82531c67569197b |
Agree in principle, although not sure how performant that is going to be. I could see this ending up as yet another function of your trusted bridge server. |
Agree with Josh. For now bridge server seems like the easiest solution.
On Tue, Apr 17, 2018 at 8:48 AM Josh Fraser ***@***.***> wrote:
Agree in principle, although not sure how performant that is going to be.
I could see this ending up as yet another function of your trusted bridge
server.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#36 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEuxN2ynL_YFrBfKs37iiMfdAb_1oVJtks5tpg7NgaJpZM4RVhXS>
.
--
Cofounder of Origin <http://www.originprotocol.com>
Join our Telegram <http://t.me/originprotocol.com>
|
It should be very performant - we just check the value once every fifteen minutes or so, and store it locally with an expiration time. It doesn't have to happen on every page load. |
I do agree however that this may want to go into the bridge server, since that way if an oracle goes haywire, existing daps aren't stuck with it. |
I was imagining far more real-time updates given how volatile crypto can be. Let's plan on 1 minute caching at most. |
+1
…On Tue, Apr 17, 2018 at 10:17 AM, Josh Fraser ***@***.***> wrote:
I was imagining far more real-time updates given how volatile crypto can
be. Let's plan on 1 minute caching at most.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#36 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEuxN1DKyzUUItramCtEzWeXjohZHeqKks5tpiObgaJpZM4RVhXS>
.
--
Cofounder of Origin <http://www.originprotocol.com>
Join our Telegram <http://t.me/originprotocol.com>
|
While it would be great to role our own, currency conversion is outside our scope. There are numerous projects doing this, and Origin Dapp creators are free to use any API/service that they like. Demo-dapp is, after all, just an example. According to this commit, Metamask is using the Cryptonator API. The commit notes, "Thankfully they don't have limits, so we can ping liberally". Given that currently most of our users will be finalizing transactions in Metamask, I suggest it makes the most sense for Demo-Dapp to use the same conversion API. |
Cryptonator seems like a perfectly reasonable choice for now. |
Should users be able to specify prices in either ETH or USD/etc? Having that feature would allow a user to peg their listing (otherwise, if a user had a listing on both Craigslist and Origin for instance, they'd have to adjust the Origin listing to track exchange rates) |
@ambertch - For now the listing price will remain constant (in ETH) and we'll just worry about displaying it also in the Giving the seller the option to price a listing in fiat (and have the eth/crypto price dynamically updated) is very cool and something we've discussed, but is not in scope for v1. |
Taking a test-first approach but hung up on some local system issues around Watchman/getting tests running. Here is my initial idea: something functional that would take a 3-letter fiat. |
Making progress. Limiting factor in my implementation is currently with nock; see commit msg |
RFC : #118 |
Ref : #130 |
Sorry for the hold-up on this; I've attempted to hold myself to a TDD standard but given an infra issue this still is not ready. I'm going to be fairly preoccupied next week (between work and Google I/O) so I'll look to do a PR with just the code change (and commented-out test) latest in two weeks. |
related to #185 |
Done via #188 ✅ |
Using this library:
https://www.npmjs.com/package/cryptocompare
The text was updated successfully, but these errors were encountered: