For the complete documentation index, see llms.txt. This page is also available as Markdown.

Euler

This page covers the Euler-specific integration flows for KPK vaults: direct ERC-4626 calls, the EVK batch flow with the Ethereum Vault Connector (EVC), and supporting reference material. For the general integrator overview and audience-routing, start at the Integration page.

End-users who simply want to deposit should use the Euler UI directly (KPK USDC Prime RWA, KPK ETH Yield Term). Vault addresses, supported assets, and current parameters are listed on each vault page.

The example uses USDC and the KPK USDC Prime RWA vault (onchain symbol KPK_USDC_Prime_RWA).

Integration paths

KPK vaults on Euler are ERC-4626 and integrate through one of two paths:

  • Direct ERC-4626 calls. Standard approve + deposit (or withdraw / redeem) against the vault contract. Simple, audit-friendly, two transactions per deposit.

  • EVK batch via the EVC. Bundles approval and deposit into a single atomic operation through the Ethereum Vault Connector. Recommended when you can support Permit2 signatures, which remove the need for a separate ERC-20 approval transaction.

For vault discovery, KPK-curated Euler Earn vaults are listed on the vault directory and can also be retrieved onchain through Euler's eulerEarnGovernedPerspective contract by calling verifiedArray(). For offchain data (TVL, deposits, user positions), use Euler's Euler Earn subgraphs.

Direct ERC-4626 integration

The simplest deposit path is a two-transaction ERC-4626 flow against the KPK vault.

Deposit

1

Approve the vault to spend USDC.

Call approve(spender, amount) on USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48):

  • spender = the KPK vault address (0x2B47c128b35DDDcB66Ce2FA5B33c95314a7de245 for KPK USDC Prime RWA, or 0xB6D6D89ad4b4D61C15a293e28b74f77F6817fF48 for KPK ETH Yield Term)

  • amount = the deposit amount, in token units

2

Deposit into the vault.

Call deposit(assets, receiver) on the KPK vault (KPK_USDC_Prime_RWA):

  • assets = the deposit amount

  • receiver = the address that should receive the vault shares (typically the depositor)

Withdraw

1

Withdraw a specific asset amount.

Call withdraw(assets, receiver, owner) on the KPK vault:

  • assets = the asset amount to withdraw

  • receiver = the address that should receive USDC

  • owner = the address whose shares should be burned (the depositor, or any address that has approved the caller)

Or by share amount:

1

Redeem a specific share amount.

Call redeem(shares, receiver, owner) on the KPK vault.

EVK batch integration

For atomic multi-step operations (e.g. Permit2 + deposit in a single transaction), use Euler's EVC batch() flow. The EVC composes a sequence of calls that revert as a unit if any step fails, which is useful for any flow that needs to combine an approval with a deposit, or to deposit into multiple vaults at once.

The Euler UI generates the calldata for these batches; integrators that build their own UI should consult the EVC integration guide for the call structure.

1

Approve Permit2 to spend USDC (one-time, gasless via signature on subsequent flows).

Call approve(spender, amount) on USDC:

  • spender = 0x000000000022D473030F116dDEE9F6B43aC78BA3 (Permit2)

  • amount = the deposit amount, or type(uint256).max for an unlimited approval

2

Submit the batch.

Call batch(items) on the EVC:

  • items = the ordered array of calldata to execute (Permit2 transfer, vault deposit, etc.). The Euler UI builds this array; if you build your own, follow the EVC batch documentation.

The same pattern applies to withdrawals: call batch() with calldata that invokes withdraw or redeem on the vault.

Claim rewards

Some KPK vaults on Euler distribute additional incentive tokens via Merkl. Claim them with:

The claim is a separate transaction and does not modify the user's deposited position.

Direct borrow flow

This section covers programmatic borrowing against the KPK ETH Yield Term underlying markets: deposit wstETH or tETH as collateral, borrow WETH at the cyclical fixed rate. For full mechanics (rate setting, repayment phase, sizing), see the ETH Yield Term borrow guide.

Without using the Euler UI's Multiply feature, the flow is a 7-step sequence: deposit collateral, enable it on the Ethereum Vault Connector (EVC), borrow WETH, and later repay.

For leveraged looping, use the Multiply feature in the Euler UI (wstETH market, tETH market). It batches supply, swap, and borrow into one transaction via the EVC and a DEX aggregator (e.g. Kyberswap), with the swap calldata constructed dynamically from live aggregator quotes. The flow below is for unleveraged borrowing (bringing your own collateral, without flash-looping).

Contract addresses

Contract
Address

KPK ETH Yield Term (earn vault)

0xB6D6D89ad4b4D61C15a293e28b74f77F6817fF48

wstETH collateral vault (ewstETH-1)

0xF6E2EfDF175e7a91c8847dade42f2d39A9aE57D4

tETH collateral vault (etETH-6)

0xA8c0Ec7E552932920fEc67eA9E98a7544e75404d

WETH borrow vault, wstETH market (eWETH-48)

0xf55B46C10138782aDE3275D81e44B8464100eAfF

WETH borrow vault, tETH market (eWETH-47)

0xB5fa20eb3c1A146E1090F24CF3c7D60263Dafa71

Ethereum Vault Connector (EVC)

0x0C9a3dd6b8F28529d72d7f9cE918D493519EE383

WETH

0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

1

Approve the collateral vault to spend your LST.

Call approve(address,uint256) (0x095ea7b3) on your collateral token (wstETH or tETH), with the corresponding collateral vault as spender:

  • 0xF6E2EfDF175e7a91c8847dade42f2d39A9aE57D4 for wstETH

  • 0xA8c0Ec7E552932920fEc67eA9E98a7544e75404d for tETH

2

Deposit collateral into the vault.

Call deposit(uint256,address) (0x6e553f65) on the same collateral vault.

3

Enable the collateral on the EVC.

Call enableCollateral(address account, address vault) (0xd44fee5a) on the EVC (0x0C9a3dd6b8F28529d72d7f9cE918D493519EE383):

  • account = your address

  • vault = the collateral vault you deposited into

4

Enable the borrow vault as your controller on the EVC.

Call enableController(address account, address vault) (0xc368516c) on the EVC:

  • account = your address

  • vault = the WETH borrow vault you want to borrow from (0xf55B46C10138782aDE3275D81e44B8464100eAfF for the wstETH market, 0xB5fa20eb3c1A146E1090F24CF3c7D60263Dafa71 for the tETH market)

Without enableCollateral and enableController, calls to borrow revert. Euler V2 enforces these bindings through the EVC.

5

Borrow WETH.

Call borrow(uint256,address) (0x4b3fd148) on the WETH borrow vault enabled as controller above.

6

(When ready to repay) Approve the borrow vault to spend WETH.

Call approve(address,uint256) (0x095ea7b3) on WETH (0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2), with the borrow vault as spender. The borrow vault needs allowance to pull WETH from your address.

7

Repay.

Call repay(uint256,address) (0xacb70815) on the same WETH borrow vault used to borrow.

Using the Euler UI

For integrators that prefer to build their calldata through the Euler UI rather than constructing it manually, the Euler UI (KPK USDC Prime RWA, KPK ETH Yield Term) prompts the same transactions described above. The flows below are kept for reference; the steps match the EVK batch integration section.

Deposit

The Euler UI will prompt you to execute these transactions in order to deposit USDC into the vault. The approval can be done through a Permit2 message or manually.

Call approve(address, uint256) on the USDC token.spender(address) = 0x000000000022D473030F116dDEE9F6B43aC78BA3 (Permit2; a one-time signature to skip re-approvals on future deposits)value(amount) = token amount to depositCall batch(tuple[]) on Euler's EVK.bundle(tuple[]) = the ordered array of calldata to execute, created by the Euler UI

Alternatively, deposit USDC into the vault by executing the following transaction order:

Call approve(address, uint256) on USDC.spender(address) = 0x2b47c128b35dddcb66ce2fa5b33c95314a7de245, i.e. KPK_USDC_Prime_RWA (or 0xB6D6D89ad4b4D61C15a293e28b74f77F6817fF48 for KPK_ETH_Yield_Term)value(amount) = token amount to depositCall deposit(uint256, address) on KPK_USDC_Prime_RWA.assets(uint256) = token amount to depositreceiver(address) = your address, or the address to which you want the receipt tokens sent

Withdraw

To initiate a withdrawal from the vault, use either of the following functions.

As suggested by the Euler UI:

Call batch(tuple[]) on Euler's EVK.bundle(tuple[]) = the ordered array of calldata to execute, created by the Euler UI

Alternatively, call a direct withdrawal from the KPK_USDC_Prime_RWA contract:

Call withdraw(uint256, address, address) on KPK_USDC_Prime_RWA.assets(uint256) = amount to withdrawreceiver(address) = address to receive USDCowner(address) = owner of the KPK_USDC_Prime_RWA position

Reference

Support

For integration questions, technical reviews, or hands-on help, reach out to sales@karpatkey.com or use the contact form. For protocol-level Euler documentation, see docs.euler.finance.

Last updated