Euler 백서

Euler

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 26쪽 중 20쪽

in/packages/euler-v2-sdk/docs/labels.md) * [Decoding Smart Contract Errors](https://github.com/euler-xyz/euler-sdks/blob/main/packages/euler-v2-sdk/docs/decode-smart-contract-errors.md) * [Entity Diagnostics](https://github.com/euler-xyz/euler-sdks/blob/main/packages/euler-v2-sdk/docs/entity-diagnostics.md) import { NetworkTabs } from "../../components/NetworkTabs"; ## Contract addresses The tables load the current production entries from the canonical [`EulerChains.json`](https://github.com/euler-xyz/euler-interfaces/blob/master/EulerChains.json) registry in [`euler-interfaces`](https://github.com/euler-xyz/euler-interfaces), which you can also consult directly. ### Networks Select a network you would like to view contract addresses for: <NetworkTabs /> ### Read next * [Build](/build) * [Euler SDK](/build/sdk) * [Reference](/reference) ## Earn products ### Overview EulerEarn vaults are ERC-4626 vaults that accept one underlying asset and issue one share token. An allocator can route deposited assets among strategies enabled for that Earn vault, including Euler lending vaults and other factory-accepted ERC-4626 strategies. A single share position simplifies portfolio handling; it does not remove strategy, liquidity, role, or smart-contract risk. An Earn vault can enable a strategy only when its factory currently allows it: the factory's configured perspective verifies the strategy, or the strategy is another Earn vault created by that factory. ERC-4626 conformance and factory acceptance are compatibility gates, not safety guarantees. Review the implementation, initialization, liquidity, governance, and dependencies of every strategy. ### What you can build <div className="docs-card-grid docs-card-grid--three"> <a className="docs-card" href="/build/earn-integrator-guide"> <strong>Earn integrations</strong> <span>Implement decimal-safe deposits, withdrawals, position tracking, approvals, and transaction checks.</span> <em>App and wallet flows</em> </a> <a className="docs-card" href="/curate/vaults/euler-earn/introduction"> <strong>Curated yield vaults</strong> <span>Launch and operate an Earn vault: evaluate strategies, set caps and queues, assign roles, and manage allocation.</span> <em>Operate a vault</em> </a> <a className="docs-card" href="/curate/vaults/euler-earn/allocator-automation"> <strong>Allocation automation</strong> <span>Reallocate within configured caps and queues, manually or through policy-controlled automation.</span> <em>Rebalancing</em> </a> </div> ### Build flow | Step | Read | | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | Integrate deposits, withdrawals, and shares | [EulerEarn integrator guide](/build/earn-integrator-guide) | | Read position and allocation data | [Data API](/build/data-querying/euler-v3-api), [Subgraphs](/build/data-querying/subgraphs) | | Resolve display metadata and known-vault status | [Vault metadata](/build/data-querying/perspectives) | | Review withdrawal liquidity | [EulerEarn integrator guide](/build/earn-integrator-guide) | | Review contract security | [EulerEarn audits](/security/earn-audits) | | Launch or operate a vault | [Introduction](/curate/vaults/euler-earn/introduction), [Deployment and management](/curate/vaults/euler-earn/deployment-and-management) | ### How underlying markets shape an Earn product An Earn vault inherits dependencies from every strategy it uses. For an EVK lending strategy: * **Oracle routes** value collateral and debt and therefore affect solvency, liquidation, and bad-debt risk. They do not directly set the borrowing interest rate. * **Interest-rate models and utilization** determine borrowing rates and the lending-rate component of supplier APY. * **Hooks** can permit, reject, or modify configured operation flows. Rewards, allocation changes, performance fees, liquidity, and losses can further change an Earn vault's realized result. Review each mechanism separately; a quoted APY does not summarize oracle, liquidation, hook, strategy, or withdrawal risk. Withdrawal capacity also depends on strategy liquidity and withdrawal-queue order. High utilization, losses, or failed strategy calls can reduce the amount available even when shares retain value, so integrations should check current limits and simulate withdrawals against current state. ## Build on Euler Euler provides a TypeScript SDK, data APIs, lens contracts, and composable smart contracts for integrating lending into apps, wallets, exchanges, bots, and other products. ### Start here | Goal | Guide | | ----------------------------------------------- | ----------------------------------------------------- | | Add supply, borrow, repay, or withdraw flows | [Euler SDK](/build/sdk) | | Discover markets and display live protocol data | [Data API](/build/data-querying) | | Interact with accounts and vaults onchain | [EVC integration guide](/build/evc/integration-guide) | | Integrate an EulerEarn vault | [Earn integrator guide](/build/earn-integrator-guide) | | Build liquidation infrastructure | [Liquidation bot](/build/liquidation-bot) | | Run a branded Euler interface | [Euler Lite](/build/euler-lite) | ### Contracts * [Ethereum Vault Connector](/build/evc) coordinates accounts, sub-accounts, operators, batching, and account checks. * [Interact with EVK vaults](/build/evk/interacting-with-vaults) covers direct lending-vault integrations. * [EVK Periphery](/build/periphery) contains factories, governors, lenses, swaps, and supporting contracts. Use [Contract addresses](/build/contract-addresses) for deployed contracts and [Euler interfaces](https://github.com/euler-xyz/euler-interfaces) for ABIs and Solidity interfaces. To create and operate a market or vault, continue to [Curate](/curate). Review the relevant [audits](/security/audits) and deployed contract versions before shipping an integration. ## Institutional vaults on Euler On Euler, an institutional vault is an EVK lending vault or EulerEarn vault tailored to an institution's assets, participants, risk framework, and operating requirements. ### What Euler provides | Need | Euler component | What it does | | ------------------------ | ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | | Lending or credit market | [Euler Vault Kit](/curate/vaults/evk/overview) | Configures the asset, accepted collateral, LTVs, oracle, interest-rate model, caps, liquidations, fees, and governance. | | Managed yield product | [EulerEarn](/curate/vaults/euler-earn/introduction) | Holds one asset and allocates it across approved ERC-4626 strategies using caps, supply queues, and withdrawal queues. | | Participant restrictions | [EVK hooks](/curate/vaults/evk/hooks-custom-logic) | Allow or reject selected EVK operations using an onchain allowlist, credential registry, or other policy contract. | | Administrative controls | [EVK governance](/curate/governance-contracts) and [EulerEarn roles](/curate/vaults/euler-earn/introduction) | Separate responsibilities, add delays, and define emergency permissions. | | Application integration | [SDK](/build/sdk), [EVC](/build/evc/integration-guide), and ERC-4626 interfaces | Support deposits, withdrawals, borrowing, repayment, batched transactions, and position data. | ### Common structures * **Permissioned lending market:** approved lenders supply an asset and approved borrowers borrow against configured collateral. * **Institutional yield vault:** an EulerEarn vault allocates treasury or client assets across a defined set of strategies. * **RWA-backed market:** tokenized assets are used as the supplied asset or collateral, with oracle, liquidity, redemption, and transfer assumptions reflected in the market configuration. * **Governed public market:** participation is open, while an institution manages caps, collateral, rates, and emergency controls under a published mandate. ### How to build one 1. Choose EVK for a lending market or EulerEarn for a managed allocation product. 2. Define the underlying asset, permitted participants, liquidity requirements, and operating roles. 3. Configure collateral, LTVs, oracle routes, interest rates, and caps for EVK, or strategies, caps, and queues for EulerEarn. 4. Add hooks only where an operation needs an onchain access or policy check. 5. Assign governance, timelock, allocator, guardian, and emergency permissions as required by the product. 6. Integrate deposits, withdrawals, reporting, and transaction review, then test normal, restricted, and emergency flows. Euler enforces the configured onchain rules. Identity verification, legal eligibility, custody, asset issuance and redemption, and regulatory reporting remain external processes operated by the institution and its providers. ### Read next * [EVK overview](/curate/vaults/evk/overview) * [Create a market or add a vault in the Toolbox](/curate/toolbox/market-ops-create) * [EulerEarn for curators](/curate/vaults/euler-earn/introduction) * [Hooks and custom logic](/curate/vaults/evk/hooks-custom-logic) * [RWA vaults](/build/rwa-vaults) ## Tokenized-asset markets A tokenized asset can be used in an EVK market only with assumptions about valuation, transferability, liquidity, governance, and legal rights. Euler provides lending and collateral infrastructure; it does not issue, sponsor, value, redeem, distribute, or determine eligibility for the underlying asset. ### External dependencies Assess and document: * issuer, custodian, administrator, and transfer-agent responsibilities; * holder and redemption rights and the legal process for enforcing them; * eligibility, transfer restrictions, freezes, blacklists, and clawbacks; * default, insolvency, impairment, and dispute scenarios; * trading calendars, settlement timing, redemption gates, fees, and minimums; * NAV or reference-price publication, staleness, corrections, and market-price divergence; and * jurisdiction, disclosure, data, and operational requirements. A token contract, hook, oracle, or metadata label does not establish those offchain facts. ### Valuation and realizability Configure the liability vault's oracle route for the intended unit of account and stress both stale and unavailable sources. If an ERC-4626 share is resolved through `convertToAssets`, assess manipulation, decimals, recursion, redemption liquidity, gates, fees, slippage, user restrictions, and whether the quoted assets can actually be realized during liquidation. A stable NAV or conversion quote does not guarantee executable liquidity. ### Transfer and liquidation design Hooks can cover configured vault operations or vault-share transfers. They do not replace issuer/token-level restrictions or offchain eligibility processes. Document which actors and actions are checked, including deposits, borrows, EVC batches, sub-accounts, transfers, repayments, withdrawals, and liquidations. Define eligible liquidators and test what happens when collateral is seized but cannot transfer, trade, settle, or redeem. Include provider outages, revocation, freezes, closed trading days, stale valuation, and delayed settlement. ### Exposure boundaries Isolating a tokenized asset in a separate market can reduce direct exposure, but dependencies can remain through collateral relationships, shared liability or collateral vaults, oracle/router governance, liquidity, hooks, applications, and integrators. Review the complete relationship graph rather than relying on an “isolated” label. Caps, LTVs, liquidation settings, and IRMs can limit configured exposure; they cannot eliminate issuer, valuation, liquidity, governance, or legal risk. ### Build flow 1. Establish asset rights, restrictions, providers, and failure assumptions. 2. Configure and test [oracle routes](/curate/oracle-routes). 3. Implement only the required [hook checks](/curate/vaults/evk/hooks-custom-logic) and map their exact operation coverage. 4. Set caps, LTVs, liquidation parameters, and [interest-rate behavior](/curate/interest-rate-models) against stressed liquidity and valuation scenarios. 5. Assign and verify [governance controls](/curate/governance-contracts). 6. Test transfer, redemption, liquidation, default, outage, and emergency scenarios. 7. Publish factual [labels and metadata](/curate/vaults/labeling). ### Read next * [Price oracles](/learn/price-oracles) * [Liquidations](/learn/liquidations) * [Attack vectors](/curate/attack-vectors) * [Vault types](/learn/vault-types) ## Factory contracts in Euler V2 Factory contracts make Euler V2 components repeatable to deploy and easier to inspect. Developers, curators, and auditors can check whether a deployed contract came from a recognized implementation and factory. Factory origin helps with review, upgrades, and governance. Each deployment still has its own parameters, roles, and connected dependencies. ### Main factory contracts #### EVault factory (generic factory) The [EVault `GenericFactory`](https://github.com/euler-xyz/euler-vault-kit/tree/master/src/GenericFactory) deploys EVK vaults. It enables permissionless creation of upgradeable or immutable vaults using a standardized proxy pattern. Vault creators specify parameters such as the underlying asset, oracle, and unit of account. Factory origin helps integrators verify the deployment source, while the live vault configuration remains separate. #### EulerEarn factory The [EulerEarn Factory](https://github.com/euler-xyz/euler-earn/blob/master/src/EulerEarnFactory.sol) allows anyone to deploy new Earn vaults. Each Earn vault is an ERC-4626 vault where users deposit one asset into one vault-share position, while configurable roles manage allocation across the vault's selected strategies. Factory origin confirms the deployment source; users and integrators should still evaluate the vault's allocator, roles, strategies, caps, liquidity, and disclosures. #### IRM factory (kink and adaptive curve) The IRM (Interest Rate Model) factory is responsible for deploying interest rate models used by vaults. Two main types are supported: * **[Kink IRM Factory](https://github.com/euler-xyz/evk-periphery/blob/master/src/IRMFactory/EulerKinkIRMFactory.sol):** Deploys linear kink interest rate models, which use a piecewise-linear curve with a "kink" point to set rates based on utilization. * **[Adaptive Curve IRM Factory](https://github.com/euler-xyz/evk-periphery/blob/master/src/IRMFactory/EulerIRMAdaptiveCurveFactory.sol):** Deploys adaptive curve models, which dynamically adjust rates based on market conditions and utilization. These factories let vaults use recognized IRM implementations and support parameter changes through the relevant governance process. Curators should still evaluate whether a selected IRM and its parameters fit the market. #### Euler router factory The [Euler Router Factory](https://github.com/euler-xyz/evk-periphery/blob/master/src/EulerRouterFactory/EulerRouterFactory.sol) deploys price oracle routers. Routers select configured price routes; the router's live routes and governor remain separate trust boundaries. #### Governor access control emergency factory The [`GovernorAccessControlEmergencyFactory`](https://github.com/euler-xyz/evk-periphery/blob/master/src/GovernorFactory/GovernorAccessControlEmergencyFactory.sol) deploys a governance suite for EVK vaults, including a `GovernorAccessControlEmergency` contract and two timelock controllers (admin and wildcard). It standardizes the setup of time-delayed and emergency-enabled governance, but operators remain responsible for assigning roles, configuring delays, monitoring changes, and communicating risks. For more, see the [Governor Access Control Emergency documentation](/build/periphery/governors#governoraccesscontrolemergency). #### Cap risk steward factory The [`CapRiskStewardFactory`](https://github.com/euler-xyz/evk-periphery/blob/master/src/GovernorFactory/CapRiskStewardFactory.sol) deploys `CapRiskSteward` contracts. A steward permits authorized, bounded cap adjustments subject to configured adjustment factors and a recharge interval. The role and the resulting cap change do not expire merely because the recharge interval passes. It may also set an IRM only when that IRM is a deployment recognized by the configured IRM factory. A steward is typically used alongside a selector-based governor; its delegated path can bypass an upstream timelock for exactly the selectors and targets granted to it. ### Verify a deployment Use [Contract addresses](/build/contract-addresses) to locate listed factory deployments, then verify the chain ID, bytecode, factory validity check, implementation, and live role/configuration state. A table entry or factory origin is not an endorsement of contracts deployed from it. ## Factory Governor The `FactoryGovernor` contract plays a crucial role in the security and management of the EVK factory. Acting as the `upgradeAdmin`, it gives trusted parties the ability to upgrade, pause, or unpause the factory and, by extension, all upgradeable vaults created by it. This centralized control is essential for emergency responses. ### What is Factory Governor? `FactoryGovernor` is installed as the `upgradeAdmin` of the EVK factory. Unlike vault-level governors such as `GovernorAccessControl`, which focus on individual vaults, `FactoryGovernor` is responsible for the factory itself and all vaults that depend on its implementation. This distinction makes it the first line of defense and intervention for protocol-wide events. ### Key Features and How They Work One of the most important features of `FactoryGovernor` is the `adminCall` function. This allows users with the `DEFAULT_ADMIN_ROLE` to execute arbitrary function calls on the factory, which is typically used for upgrades or other administrative actions. This level of access should be reserved for highly trusted entities, such as DAO multisig. In addition to upgrades, `FactoryGovernor` provides robust mechanisms for pausing and unpausing the factory. If a situation arises that requires immediate intervention — such as a discovered vulnerability or a market event — anyone with the `PAUSE_GUARDIAN_ROLE` can pause the factory. This is done by installing a `ReadOnlyProxy` as the factory's implementation. The effect is immediate: all upgradeable vaults created by the factory are paused, as they rely on the factory's implementation. Importantly, non-upgradeable vaults are not affected by this action, preserving their independence. When the situation is resolved, a user with the `UNPAUSE_ADMIN_ROLE` can unpause the factory. This is accomplished by retrieving the previous implementation from the `ReadOnlyProxy` and restoring it as the factory's implementation. ### Roles and Security Considerations The `FactoryGovernor` contract relies on three main roles: `DEFAULT_ADMIN_ROLE`, `PAUSE_GUARDIAN_ROLE`, and `UNPAUSE_ADMIN_ROLE`. The admin role is the most powerful and should be held by a highly trusted multisig, as it can perform admin calls and manage roles. The pause and unpause roles are typically delegated to guardians or curators who are responsible for monitoring the protocol and responding to emergencies. Careful assignment of these roles is critical. Only trusted parties should have the ability to pause or unpause the factory, as these actions affect all upgradeable vaults. Pausing is a powerful circuit breaker and should be used judiciously. While it provides immediate protection in emergencies, it also halts all upgradeable vault activity. For layered security, `FactoryGovernor` is combined with vault-level governors, which can provide more granular control and additional safeguards. #
프로젝트로 돌아가기