Repository navigation
fix(security): require acknowledgement before depositing into non-Yearn vaults - #1493
Merged
Merged
Conversation
…rn vaults Vault pages for ERC-4626 vaults Kong does not attribute to Yearn kept a live Deposit action behind only a warning banner. For those vaults: - Deposit and Migrate render an acknowledgement panel instead of the widget until the user confirms, once per browser session per vault, that the vault is not a Yearn vault. The widget is not given those actions before then. Withdraw is never gated. - Page metadata sets robots noindex/nofollow. Yearn vault pages are unchanged. - The page heading shows the vault address next to the deployer-chosen name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Deploy preview for yearn-bold ready!
Deployed with vercel-action |
|
Deploy preview for yearn-fi ready!
Deployed with vercel-action |
…ird-party The flag means the vault is not on Yearn's endorsed list. It also covers Yearn's own tokenized strategies and established third-party vaults, so the panel should not claim the vault was deployed by an unknown third party. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kong indexes ERC-4626 vaults that Yearn did not deploy, and
/vaults/[chainID]/[address]renders any vault Kong knows about. Vaults thatisNonYearnErc4626Vaultflags (Kongorigin !== 'yearn'orinclusion.isYearn === false) already showed a warning banner and non-Yearn metadata, but kept a live Deposit action and stayed indexable.For flagged vaults only, this PR:
Widgetis not given those actions at all, so it cannot build a deposit transaction. Withdraw is never gated. The acknowledgement lasts for the browser session and applies to one chain + address (sessionStorage).robots: { index: false, follow: false }in the vault page metadata (buildVaultMetadataFromInput, used by/vaults/...and/v3/...). Yearn vault pages keep the layout'sindex, follow.h1), e.g.Name · 0x1234...abcd, because the name is chosen by whoever deployed the vault.Yearn vault pages are unchanged.
Verification
bun run tslint,bun run lint:fixclean;bun run test: 194 files / 1139 tests pass.vaultWarnings.test.ts(gating rule, storage-key scope, heading) andapp/metadata.test.ts(robots). They fail onmainand pass on this branch.On the preview
/vaults/1/0xcb1Eb72F2a27E9EAD2e2Fb3F0AAC7E4Ee39F2EeBUSDC to yvUSDS-1 Depositor · 0xcb1E...2EeB.<meta name="robots" content="noindex, nofollow">in the page source (note: Vercel previews are also blocked byrobots.txt, so check the meta tag itself)./vaults/1/0xBe53A109B494E5c9f97b9Cd39Fe969BE68BF6204. Deposit form shows straight away, heading has no address, robots meta isindex, follow.🤖 Generated with Claude Code