-
Notifications
You must be signed in to change notification settings - Fork 5
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 flashmint nav #90
Conversation
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 - SO FAR
inputToken: isMinting ? inputToken.address : usdc, | ||
outputToken: isMinting ? usdc : outputToken.address, | ||
// TODO: | ||
inputAmount: inputTokenAmount.toString(), |
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.
@edkim for the reserve asset quote (to get the swap data) I guess it makes sense to use the inputTokenAmount
of the quote request here when minting but what about redeeming? Because then inputTokenAmount
would be the index token amount to redeem?
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.
When redeeming you need to swap the reserve asset (USDC) for the user's chosen output token (ex. WETH). So inputTokenAmount should be how much USDC we want to swap. Then 0x gives back a quote for how much WETH you'd get.
To get the USDC value of however many setTokens the user is redeeming you can call this read function on the NAV Issuance Module: https://etherscan.io/address/0x2344674B23aD076908FD2396373CfE9cd48A1ba3#readContract#F2
# Conflicts: # hardhat.config.js
feat: update icusd composition
feat: add icusd router
🎉 This PR is included in version 3.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
TODOs
FlashMintQuoteRequest
?