GithubHelp home page GithubHelp logo

Comments (22)

inkredabull avatar inkredabull commented on May 20, 2024 3

@wanderingstan I'll take this.

from origin.

joshfraser avatar joshfraser commented on May 20, 2024 1

Great question. Showing prices in fiat seems way more friendly to me. A few things we need to keep in mind though:

  1. Our community is global, so we need to support a lot more fiat currencies than just USD
  2. 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)
  3. 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.

ambertch avatar ambertch commented on May 20, 2024

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:

screenshot 2018-04-16 18 24 25

vs.

screenshot 2018-04-16 18 24 51

(@inkredabull)

from origin.

DanielVF avatar DanielVF commented on May 20, 2024

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.

joshfraser avatar joshfraser commented on May 20, 2024

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.

matthewliu avatar matthewliu commented on May 20, 2024

from origin.

DanielVF avatar DanielVF commented on May 20, 2024

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.

DanielVF avatar DanielVF commented on May 20, 2024

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.

joshfraser avatar joshfraser commented on May 20, 2024

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.

matthewliu avatar matthewliu commented on May 20, 2024

from origin.

wanderingstan avatar wanderingstan commented on May 20, 2024

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.

joshfraser avatar joshfraser commented on May 20, 2024

Cryptonator seems like a perfectly reasonable choice for now.

from origin.

ambertch avatar ambertch commented on May 20, 2024

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.

wanderingstan avatar wanderingstan commented on May 20, 2024

@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.

inkredabull avatar inkredabull commented on May 20, 2024

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.

inkredabull avatar inkredabull commented on May 20, 2024

Making progress.

Limiting factor in my implementation is currently with nock; see commit msg

from origin.

inkredabull avatar inkredabull commented on May 20, 2024

RFC : #118

from origin.

inkredabull avatar inkredabull commented on May 20, 2024

#118

from origin.

inkredabull avatar inkredabull commented on May 20, 2024

Ref : #130

from origin.

inkredabull avatar inkredabull commented on May 20, 2024

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.

gaboesquivel avatar gaboesquivel commented on May 20, 2024

related to #185

from origin.

micahalcorn avatar micahalcorn commented on May 20, 2024

Done via #188

from origin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.