Comments (22)
@wanderingstan I'll take this.
from origin.
Great question. Showing prices in fiat seems way more friendly to me. A few things we need to keep in mind though:
- Our community is global, so we need to support a lot more fiat currencies than just USD
- We'll need to find free and reliable API's for doing the ETH/Fiat conversion (with a fallback plan if that data is not available for any reason)
- Users should be able to set their preferred currency in the DApp. It would be nice to make an intelligent guess from their location & or have whatever currency they choose be cached and remembered in localStorage.
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.
from origin.
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.
from origin.
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
from origin.
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.
from origin.
from origin.
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.
from origin.
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.
from origin.
I was imagining far more real-time updates given how volatile crypto can be. Let's plan on 1 minute caching at most.
from origin.
from origin.
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.
from origin.
Cryptonator seems like a perfectly reasonable choice for now.
from origin.
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)
from origin.
@ambertch - For now the listing price will remain constant (in ETH) and we'll just worry about displaying it also in the user's buyer's desired currency.
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.
from origin.
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.
from origin.
Making progress.
Limiting factor in my implementation is currently with nock; see commit msg
from origin.
RFC : #118
from origin.
from origin.
Ref : #130
from origin.
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.
from origin.
related to #185
from origin.
Done via #188 ✅
from origin.
Related Issues (20)
- Campaigns home page crash when there is no active campaign HOT 3
- Sign in to Dapp token validation
- Tests broken HOT 5
- Pagination: double listings HOT 2
- Rewards Redirect Interrupting Transaction Flow HOT 1
- Systems asks to leave a review, but I did it already
- Purchases Sorting Order
- USDT incorrectly configured
- Log Downgraded Mode
- Purchase Confirmation Issues
- #bug-reports HOT 1
- "A review has been left on your transaction" email sent to reviewer HOT 3
- Kubernetes 1.16 requires some Helm chart changes HOT 4
- SyntaxError: The string did not match the expected pattern.
- Add "Origin App v2 is coming" top bar to Origin Marketplace
- Listener on rinkeby issues a large number of eth_getLogs requests
- Auth-server encrypted private key password HOT 1
- Alchemy eth_getLogs block window changes HOT 1
- Action Required: Fix Renovate Configuration
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from origin.