Skip to content

feat: frv optimazation#5675

Open
cuzz-venus wants to merge 4 commits into
mainfrom
feat/valuts-optimization
Open

feat: frv optimazation#5675
cuzz-venus wants to merge 4 commits into
mainfrom
feat/valuts-optimization

Conversation

@cuzz-venus

@cuzz-venus cuzz-venus commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Jira ticket(s)

VPD-1509

Changes

  • add dynamic vaults name for fixed rate vaults
  • update ui style for venue
  • add contract address

@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e1fa7b4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@venusprotocol/evm Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dapp-preview Ready Ready Preview Jul 8, 2026 10:44am
dapp-testnet Ready Ready Preview Jul 8, 2026 10:44am
venus.io Ready Ready Preview Jul 8, 2026 10:44am

Request Review

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates fixed-rate vault venue handling and vault UI details. The main changes are:

  • Centralized venue names, icons, and URLs for Venus, Pendle, Matrixdock, Ceffu, and Cactus.
  • Added dynamic institutional venue names from the fixed-rate vault API.
  • Added venue names to formatted vault models and mocks.
  • Added contract address and collateral rows to vault card and overview UI.
  • Updated translations and snapshots for the new vault labels.

Confidence Score: 4/5

This is close, but the venue copy behavior should be fixed before merging.

  • The Pendle overview still copies the deposited asset address from the venue row.
  • The formatted Pendle vault already exposes the correct market address on venueAddress.
  • The rest of the scoped venue and UI changes are consistent with the updated model shape.

apps/evm/src/containers/VaultCard/PendleVaultModal/OverviewTab/index.tsx

Important Files Changed

Filename Overview
apps/evm/src/containers/VaultCard/PendleVaultModal/OverviewTab/index.tsx Passes the new contract and venue fields into the market-info panel, but the venue copy target still uses the asset address.
apps/evm/src/containers/VaultCard/VaultOverviewMarketInfo/index.tsx Renders contract address, venue, collateral, and risk disclosure rows for vault overview modals.
apps/evm/src/clients/api/queries/useGetVaults/getVenueConfig/index.ts Adds shared venue config lookup for known venue names and fallback venue display data.
apps/evm/src/clients/api/queries/useGetVaults/useGetFormattedFixedRatedVaults/formatVaults/formatToInstitutionalVault/index.tsx Formats institutional vault venue display data from the API institution name.
apps/evm/src/types/index.ts Adds venueName to vault models and allows institutional vault URLs to be absent.

Reviews (2): Last reviewed commit: "feat: vaults name style" | Re-trigger Greptile

venueName={vault.venueName}
venueIconSrc={vault.venueIconSrc}
venueUrl={vault.venueUrl}
copyAddress={vault.asset?.vToken?.underlyingToken?.address}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Venue Row Copies Token Address

The venue row links to the Pendle market, but its copy button now receives vault.asset?.vToken?.underlyingToken?.address. On Pendle vaults this copies the Venus asset's underlying token address instead of the venue or market address, so users copying the venue row get the wrong contract.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @therealemjy , since its already set underlyingToken address to copyAddress before, can you also help check if it reasonable to set copyAddress={vault.venueAddress}?

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 82.2% 50202 / 61066
🔵 Statements 82.2% 50202 / 61066
🔵 Functions 61.92% 670 / 1082
🔵 Branches 73% 5707 / 7817
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/clients/api/queries/useGetVaults/formatToVenusVault/index.tsx 100% 100% 100% 100%
apps/evm/src/clients/api/queries/useGetVaults/getVenueConfig/index.ts 89.79% 33.33% 100% 89.79% 1, 54, 60-63
apps/evm/src/clients/api/queries/useGetVaults/useGetFormattedFixedRatedVaults/formatVaults/formatToInstitutionalVault/index.tsx 99.23% 15.38% 100% 99.23% 1
apps/evm/src/clients/api/queries/useGetVaults/useGetFormattedFixedRatedVaults/formatVaults/formatToPendleVault/index.tsx 97.59% 81.81% 100% 97.59% 1, 103
apps/evm/src/containers/VaultCard/index.tsx 78.42% 69.56% 0% 78.42% 54-58, 61-63, 67, 96-98, 122-141, 212-229, 278-283, 289-292
apps/evm/src/containers/VaultCard/InstitutionalVaultModal/OverviewTab/index.tsx 100% 0% 100% 100%
apps/evm/src/containers/VaultCard/PendleVaultModal/OverviewTab/index.tsx 100% 100% 100% 100%
apps/evm/src/containers/VaultCard/VaultOverviewMarketInfo/index.tsx 100% 100% 100% 100%
apps/evm/src/pages/Vaults/VaultList/hooks/useFilterOptions.tsx 91.4% 80% 0% 91.4% 25-29, 31-35, 37-39
apps/evm/src/types/index.ts 100% 100% 100% 100%
Generated in workflow #13776 for commit e1fa7b4 by the Vitest Coverage Report Action

@cuzz-venus cuzz-venus requested a review from therealemjy July 7, 2026 12:56
@cuzz-venus

Copy link
Copy Markdown
Contributor Author

@greptile review again

venueName={vault.venueName}
venueIconSrc={vault.venueIconSrc}
venueUrl={vault.venueUrl}
copyAddress={vault.asset?.vToken?.underlyingToken?.address}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Venue Copies Token

The venue row still receives the underlying token address as its copy target. VaultOverviewMarketInfo uses copyAddress for the row labeled Venue, while Pendle vaults already carry the Pendle market address on vault.venueAddress. When a user copies the venue row, they get the deposited asset address instead of the Pendle market address.

Suggested change
copyAddress={vault.asset?.vToken?.underlyingToken?.address}
copyAddress={vault.venueAddress}

- rename VaultVenue.Matrixdock -> Institution; all fixed-term vaults use it
- filter option gets institution icon + i18n key (vault.filter.institution, 7 locales)
- rename riskDisclosureText.matrixDock -> institution key (content unchanged)
- fix Pendle overview venue row copyAddress to use vault.venueAddress

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Object.values(VenueName).map(venueName => [venueName.toLowerCase(), venueName]),
) as Record<string, VenueName>;

export const getVenueConfig = (venueName?: string | null): VenueConfig => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's avoid using null whenever we can. Since this function is called with a value coming from the backend, you can format null into undefined when calling the function:

getVenueConfig(nullableBackendValue ?? undefined);

const matchedVenueName = venueNameByKey[key];

if (!matchedVenueName) {
return { name: venueName as string, iconSrc: DEFAULT_VENUE.iconSrc };

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a small thing, but since you define a default Venue object you can spread it to make sure all future props that might get added to it are also included here:

Suggested change
return { name: venueName as string, iconSrc: DEFAULT_VENUE.iconSrc };
return { ...DEFAULT_VENUE, name: venueName as string };

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