-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: add rwa issuance #1357
feat: add rwa issuance #1357
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
61f9547
to
15ba4d1
Compare
if (outputToken.symbol !== RealWorldAssetIndex.symbol) return units | ||
return ( | ||
(inputTokenAmount * BigInt('1000000000000000000')) / | ||
BigInt('23800000000000000') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For issuances we need to take the exchange rate into account - as otherwise the output token amount would be wrong since RWA is not 1-1 wstETH like hyETH before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - few smol questions
inputToken.symbol === RealWorldAssetIndex.symbol || | ||
outputToken.symbol === RealWorldAssetIndex.symbol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious - why is it true
here if it's not for hyETH? Or was hyETH here before but got removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because for presale the tokens use the issuance and once live they use flash minting. If hyETH would be still active here, the swap functionality would try to return an issuance quote. See this #1331 for decoupling these functionalities.
# Conflicts: # src/app/presales/constants.ts
Summary of Changes
Resources
Test Data or Screenshots
By submitting this pull request, you are confirming the following to be true:
IndexCoop/index-app
.