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

feat: add rwa issuance #1357

Merged
merged 21 commits into from
Jun 19, 2024
Merged

feat: add rwa issuance #1357

merged 21 commits into from
Jun 19, 2024

Conversation

janndriessen
Copy link
Collaborator

@janndriessen janndriessen commented Jun 17, 2024

Summary of Changes

  • Updates RWA presale data using deployed token
  • Updates issuance code as necessary for RWA
  • Updates tokenlists
  • Removes obsolete default chain on token type

Resources

Test Data or Screenshots

Bildschirmfoto 2024-06-17 um 15 26 43 Bildschirmfoto 2024-06-17 um 15 27 29
By submitting this pull request, you are confirming the following to be true:
  • I have reviewed the Contribution Guidelines.
  • I have performed a self-review of my own code.
  • I have updated my repository to match the master at IndexCoop/index-app.
  • I have included test data or screenshots that prove my fix is effective or that my feature works.

Copy link

vercel bot commented Jun 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
index-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 3:29am

if (outputToken.symbol !== RealWorldAssetIndex.symbol) return units
return (
(inputTokenAmount * BigInt('1000000000000000000')) /
BigInt('23800000000000000')
Copy link
Collaborator Author

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.

Copy link
Collaborator

@0xonramp 0xonramp left a 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

src/app/presales/components/pre-sale-section/index.tsx Outdated Show resolved Hide resolved
Comment on lines +154 to +155
inputToken.symbol === RealWorldAssetIndex.symbol ||
outputToken.symbol === RealWorldAssetIndex.symbol
Copy link
Collaborator

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?

Copy link
Collaborator Author

@janndriessen janndriessen Jun 18, 2024

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.

@janndriessen janndriessen marked this pull request as ready for review June 19, 2024 15:51
@janndriessen janndriessen merged commit c6299af into master Jun 19, 2024
3 checks passed
@janndriessen janndriessen deleted the feat/add-rwa-issuance branch June 19, 2024 15:55
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

Successfully merging this pull request may close these issues.

2 participants