Skip to main content

Integrator Guide

EulerEarn vaults are standard ERC-4626 vaults with meta-allocation logic. Users get a simple deposit/redeem experience; integrators get a familiar interface with extras like Permit2 and EVC batching.

Offchain

Subgraphs

Subgraphs include multiple schemas for EulerEarn as denoted by their names including EulerEarn.

From here, you can track multiple sets of data such as:

  • Changes made to an EulerEarn vault
  • Deposit and withdrawal flows
  • User positions

API

An API is currently in the works and will be linked here once fully released.

Onchain

ERC-4626 Interface

  • deposit(uint256 assets, address receiver)
  • mint(uint256 shares, address receiver)
  • withdraw(uint256 assets, address receiver, address owner)
  • redeem(uint256 shares, address receiver, address owner)

Vaults also expose totalAssets() and totalSupply(); compute exchange rate as convertToAssets(1e18 shares) or totalAssets/totalSupply.

For the full specification, check out the EIP: eips.ethereum.org/EIPS/eip-4626

Approvals & Permit2

Support Uniswap’s Permit2 for gasless approvals if your wallet/app supports it; otherwise request a standard ERC-20 approval flow.

To integrate Permit2, check out the GitHub repository: github.com/Uniswap/permit2

Batching via EVC

Advanced flows can batch actions atomically with the Ethereum Vault Connector (EVC). For simple Earn usage, direct vault calls suffice.

To integrate EVC batching, check out the EVC Integration Guide

Discovery & Listing

Unlike EVK vaults where you can pull a verified list of vaults from the euler-labels repository, verified Earn vaults can be pulled onchain through the eulerEarnGovernedPerspective contract by calling the verifiedArray method.

You can find the address of this contract through Contract Addresses.