Giter VIP home page Giter VIP logo

Display the dollar value they would be able to convert their bonds for. (Call the `previewConvert` function on the contract then multiple that value * the token price to get the dollar value. about frontend HOT 6 CLOSED

porter-finance avatar porter-finance commented on June 30, 2024
Display the dollar value they would be able to convert their bonds for. (Call the `previewConvert` function on the contract then multiple that value * the token price to get the dollar value.

from frontend.

Comments (6)

RusseII avatar RusseII commented on June 30, 2024

You'll only need to do previewConvert(1 * 10^18) to get the number of collateralTokens that the bond converts into. I wouldn't worry about the price data yet - but there are a few options on how you can get that.

  • CoinGeko API
  • That data is accessible via some graphs, like Uniswap. We could use their graph or maybe index the data and add it to our graph for all of our collateral tokens.

from frontend.

RusseII avatar RusseII commented on June 30, 2024

To be clear - you can cut out

multiple that value * the token price to get the dollar value

from frontend.

luckyrobot avatar luckyrobot commented on June 30, 2024

is this the same as the two remaining tasks in:

#17 (comment)

from frontend.

RusseII avatar RusseII commented on June 30, 2024

is this the same as the two remaining tasks in:

It's similar enough that we can close this TBH. I don't think it's worth adding this until the design phase

Difference is that this issue should basically show the user if its WORTH converting their bonds or not based on current prices and ratio, where the other 2 tasks facilitate the conversion itself

from frontend.

luckyrobot avatar luckyrobot commented on June 30, 2024

ignore the other 2 tasks too until design, or required?

from frontend.

RusseII avatar RusseII commented on June 30, 2024

ignore the other 2 tasks too until design, or required?

Required now

from frontend.

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.