Skip to main content

Perspectives

Perspectives are on-chain contracts that encode validity criteria for Euler Vault Kit (EVK) credit vaults. They provide a permissionless, programmable way to verify, filter, and curate vaults based on arbitrary logic — enabling safer, more transparent DeFi integrations and user interfaces.

Why Perspectives?

The EVK is designed to be maximally flexible, allowing anyone to create vaults with custom configurations. While this enables innovation, it also means that some vaults may be insecure, misconfigured, or accept unsafe collateral. Perspectives solve this by providing a mechanism for on-chain, verifiable validation of vault properties.

Perspectives can:

  • Enforce risk standards (e.g., only immutable vaults, or vaults with trusted oracles)
  • Filter out vaults with dangerous or unverified collateral
  • Enable curated token/vault lists for frontends and analytics
  • Allow users and integrators to define and share their own trust criteria

How Perspectives Work

A Perspective is a smart contract that implements the following interface:

interface IPerspective {
function perspectiveVerify(address vault, bool failEarly) external;
function isVerified(address vault) external view returns (bool);
function verifiedLength() external view returns (uint256);
function verifiedArray() external view returns (address[] memory);
}
  • perspectiveVerify(address vault, bool failEarly): Inspects the vault and, if it meets the perspective's criteria, records this fact in storage (memoizing the result for future queries). This can be gas-intensive, so it's only done once per vault.
  • isVerified(address vault): Returns true if the vault has been verified and meets the criteria.
  • verifiedArray(): Returns the list of all vaults that have been verified by this perspective.
  • verifiedLength(): Returns the number of verified vaults.

Use Cases

  • Token/Vault Lists: Perspectives can act as on-chain equivalents of token lists, allowing UIs to filter vaults by arbitrary criteria. Users can select which perspectives to trust, or combine multiple perspectives for advanced filtering.
  • Risk Management: Protocols and DAOs can deploy perspectives to enforce risk standards, e.g., only showing vaults with immutable code, trusted governance, or specific collateral types.
  • Custom Curation: Anyone can deploy a perspective for any purpose — compliance, whitelisting, blacklisting, or experimental features.

How to Use Perspectives

  1. Verification: Call perspectiveVerify(vault, false) to verify a vault against the perspective's criteria. This is typically done once per vault.
  2. Querying: Use isVerified(vault) to check if a vault is verified, or verifiedArray() to get all verified vaults.
  3. Integration: UIs and analytics tools can use perspectives to filter and display only vaults that meet desired standards.

Example: Filtering for Verified Vaults

Suppose you want to display only vaults that are verified by a particular perspective:

const verifiedVaults = await perspectiveContract.verifiedArray();
// Now filter your vault list to only include these addresses

Or, to check a single vault:

const isSafe = await perspectiveContract.isVerified(vaultAddress);

Practical Adoption

While Perspectives are designed to enable a wide range of on-chain rule checking and automated curation, in practice, the vast majority of vaults currently displayed in the Euler UI are those that have been manually verified and included in the governedPerspective. Other perspectives exist, but have seen little adoption so far. As a result, most users and integrators will interact primarily with vaults that have been reviewed and added to the governed perspective by the Euler Labs team.