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

Enable zaps on Fantom vaults #710

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft

Conversation

mazurroman
Copy link

@mazurroman mazurroman commented Jun 8, 2022

Description

Override metadata on supported vaults to enable USDC zaps on Fantom.

Related Issue

yearn/yearn-sdk#297

Motivation and Context

Remove friction for deposits into Yearn vaults. This is Step 1 of the Yearn <> Wido Router integration proposal to enable frictionless deposits into all Yearn vaults, regardless of the chain the user is depositing from.

This is just a draft PR to kick off the discussion.

Zaps have been pretty successful on Ethereum, contributing to almost 50% of all deposits (see chart below).

image

Note on the chart: It's filtered down to curve vaults with at least one zapIn function call each month to skip vaults with no support for zaps. Source.

How Has This Been Tested?

It was tested locally with the frontend running the yalc'ed SDK.

Left ToDo

  • Add wido.spec.ts
  • Signed permits not working
  • Use an api instead of importing the abi
  • Use options.slippage when calculating minOutputToken
  • Simulating output value (when withdrawing) is wrong
  • After approve, the button stays enabled, and you need to refresh the page
  • Update token metadata for USDC and vaults to include zapInWith: zapperZapIn commit
  • Add wido contract to yearn’s on-chain AllowList to allow tx validation to pass: diff

Example txs:

https://ftmscan.com/tx/0x4bcd9791a24307bc7760f543ce2d3f15201d578aff5460976d759288f80b834a
https://ftmscan.com/tx/0xc8d1c86e90dda1a1487672cda5dba0005646ba0ad6b4057408526586aae963c6

Screenshots:

The following 4 screenshots show how zapIn into a Fantom vault looks

@mazurroman mazurroman changed the title [DRAFT] Enable zaps on Fantom vaults Enable zaps on Fantom vaults Jun 8, 2022
@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-710.d27dgpz01hmbvx.amplifyapp.com

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