Add Wido Zaps with support for more vaults#306
Add Wido Zaps with support for more vaults#306mazurroman wants to merge 18 commits intoyearn:mainfrom
Conversation
* Add Wido Zaps part 1 * Add wido zaps part 2 * Update src/interfaces/simulation.ts Co-authored-by: Kunal Jain <jainkunal3004@gmail.com> * 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 <jainkunal3004@gmail.com>
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 |
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
priceUSDCis missing in supported tokensScreenshots (if appropriate):