Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #11

Closed
Tracked by #3
RusseII opened this issue Mar 23, 2022 · 6 comments

Comments

@RusseII
Copy link
Contributor

RusseII commented Mar 23, 2022

No description provided.

@RusseII
Copy link
Contributor Author

RusseII commented Mar 25, 2022

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.

@RusseII
Copy link
Contributor Author

RusseII commented Mar 25, 2022

To be clear - you can cut out

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

@luckyrobot
Copy link

is this the same as the two remaining tasks in:

#17 (comment)

@RusseII
Copy link
Contributor Author

RusseII commented Mar 25, 2022

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

@RusseII RusseII closed this as completed Mar 25, 2022
@luckyrobot
Copy link

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

@RusseII
Copy link
Contributor Author

RusseII commented Mar 25, 2022

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

Required now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants