-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add Wido Zaps with support for more vaults #306
base: main
Are you sure you want to change the base?
Conversation
* Add Wido Zaps part 1 * Add wido zaps part 2 * Update src/interfaces/simulation.ts Co-authored-by: Kunal Jain <[email protected]> * Address PR feedback * Hoist wido before portals * Update supported vaults & caches * Fix populate tx error * Disable allowlist * Address some TODOs Co-authored-by: Kunal Jain <[email protected]>
342cb2b
to
7613ea1
Compare
PR looks good overall :) We should add a mechanism to dynamically switch precedence between different zap providers. So users of SDK can define the precedence of their choice if a vault is supported on multiple services. An idea could be setting a configuration on the SDK context, so this can be set when the SDK gets instantiated, and have a default if its not provided. Also that same mechanism would be useful to turn on/off a zap service provider (this can be done in separate PR though) for added privacy use cases. something like: export interface ContextValue {
...
zaps?: {
zapInWith: ZapInWith[];
zapOutWith: ZapOutWith[];
};
...
} Where the first element in the array takes precedence over the next. wdyt? |
Makes sense. Can you take a look at c82cc69 ? |
With regards to I audited If we were to deprecate/remove |
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.
Left some comments :)
Ok cool then, lets leave them for now since its done and code looks good, and once we get out of alpha for this version I will deprecate and remove those functions. Thanks for looking into it! |
d7f0bb1
to
03cbe11
Compare
Resolved Conflicts: src/common.ts src/interfaces/vault.ts src/yearn.ts
Description
Add Zap support for more vaults on Yearn.
Wido brings Zap support for:
With Zaps for more vaults to come later.
Related Issue
PR in yearn-finance-v3 yearn/yearn-finance-v3#755
Motivation and Context
Zaps let users deposit any token into a vault instead of just the underlying token. That improves UX and increases deposits and TVL.
Data shows that Zaps contribute to 40% of deposits on Yearn. Having Zap support for all vaults will grow Yearn's overall TVL.
Report: https://twitter.com/widolabs/status/1574762471314915334
How Has This Been Tested?
It was tested locally with the front end running the yalc'ed SDK.
Left to do
priceUSDC
is missing in supported tokensScreenshots (if appropriate):