bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 26쪽 중 13쪽
/interest-rate-models)
* [Attack vectors](/curate/attack-vectors)
## Curate on Euler
Create and operate EVK markets, EulerEarn vaults, and EulerSwap pools. These guides cover deployment, configuration, governance, metadata, and ongoing management. For EVK markets and for labels, the work happens in the [Toolbox](/curate/toolbox).
### Choose what you run
| What you run | Start here | Operations |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| EVK market, vault, or cluster | [The Toolbox](/curate/toolbox); [deployment scripts](/curate/vaults/evk/deployment-and-management) for large clusters | Assets, collateral graph, oracle routes, IRM, caps, LTVs, liquidation settings, hooks, fees, governance, and labels |
| EulerEarn vault | [Earn introduction](/curate/vaults/euler-earn/introduction) | Strategies, roles, caps, queues, allocation, liquidity, fees, loss accounting, and metadata |
| EulerSwap pool | [EulerSwap 2](/curate/euler-swap) | Pool version, LP account, vault pair, manager and hook authority, parameters, fees, liquidity, quotes, and decommissioning state |
| Metadata and discovery | [Labels and metadata](/curate/vaults/labeling) | Claim vaults, group them into products, name your organisation; Euler publishes; metadata is not a safety verdict |
| Governance or response | [Governance in the Toolbox](/curate/toolbox/governance), [Governance contracts](/curate/governance-contracts) | Role membership, selectors, timelocks, upgradeability, pause paths, signer policy, and recovery limits |
### Shared tools
* [The Toolbox](/curate/toolbox) — create and operate EVK markets, label vaults and products, deploy oracle adapters and interest-rate models, read transactions before signing.
* [Risk & Analytics dashboard](/use/risk-dashboard) — inspect market trends, borrowing exposure, and liquidation-bot observations.
* [Launch toolkit](/launch) — plan a production launch and operational handoff.
* [Oracle adapters and routes](/curate/oracle-routes) and [interest-rate models](/curate/interest-rate-models) — configure pricing and rates.
* [Labels and metadata](/curate/vaults/labeling) — make vaults and products discoverable.
* [Governance contracts](/curate/governance-contracts) — assign and manage permissions.
* [Attack vectors](/curate/attack-vectors) — review common risks before launch.
Before deploying, verify contract addresses, parameters, permissions, and monitoring on the target chain. Use [Build](/build) for SDK, API, and direct contract integrations.
## Labels and metadata
A label is what Euler apps show next to a vault, a product or a curator: its name, logo, description and notice.
Labels change nothing on chain, and they aren't a safety verdict.
Until Euler publishes a vault's label, apps show the vault as unknown and unverified, hide it by default, and warn users who interact with it. Escrow vaults are the exception: apps recognise them without a label. Whether a labelled vault is listed also depends on Euler's checks; see [Known vaults](/build/data-querying/perspectives).
You edit labels under **Curator → Labels** in the [Toolbox](/curate/toolbox).
### What you manage under Labels
| Piece | What it is |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Profile** | Your organisation as users see it: name, description, links and logo. |
| **Verified addresses** | Addresses Euler has confirmed are yours. Every vault claim is checked on chain against them. Euler adds or removes them; a team admin can rename them. |
| **Product** | A named group of your vaults on one chain, with a logo, description, website and optional portfolio notice. |
| **Vault** | A vault's name and labels, deprecation state and **Discovery status**. EVK and Securitize vaults are listed through a product. |
| **Earn vault** | An EulerEarn vault, labelled on its own. It never joins a product. |
A few rules about products:
* Each product is on one chain, and its product ID can't be changed.
* Vaults use the product's name, description and notice unless you give them their own. If a product has no website or logo, it uses the ones from your profile.
* If a product's vaults are ungoverned, the product locks after its first save.
* Only Euler can move a product to another curator.
### Products and markets
A product is a label; a market is on chain. Keep **one product per market**: Market Ops uses a product's vaults to decide what belongs to the market, so every vault in a market, including ones you add later, belongs in the same product. See [Markets and products](/curate/toolbox#markets-and-products).
### Claim a vault
Claiming a vault links it to your labels. Euler checks on chain that one of your verified addresses governs it: the governor of an EVK vault, or the owner of an EulerEarn vault. If the check fails, nothing changes.
**Labels → Vaults → Claim a vault**: the chain, the vault's address, and optionally the product it joins. You can add it to a product later. Claiming doesn't name the vault; you do that on the vault's own page. To claim vaults straight into a product, use **Add vault** on the product's page.
You can't claim:
* **A vault whose governor was renounced.** Euler assigns it. It stays hidden until the assignment is checked.
* **An escrow vault.** It always shows as escrowed collateral.
You can claim several vaults at once; each is checked separately. Market creation offers to claim the new vaults.
An EulerEarn vault can also be claimed from its page under **Curator → Earn**: **Claim in Labels** on its **Overview** opens the claim with the vault filled in. Once it is claimed, its label page offers **Open in Earn**.
### Deprecate
Deprecating a vault or product adds a **Deprecated** badge and your reason wherever it appears. Nothing changes on chain. The vault is removed from the lend, borrow and explore tables until it's listed again under **Discovery**. You can undo deprecation.
### Discovery status
Visible, Warning, Hidden or Not listed yet, with the reason. Decided by two checks that run on their own:
* **Configuration check**: Euler's review of the on-chain configuration.
* **Consistency check**: the labels against the chain and the product.
A claimed EVK or Securitize vault outside any product is not listed; those are listed through their product. Earn vaults are listed on their own.
### Saved and published
Every edit saves to your draft straight away. It shows **Not published yet** or **Unpublished changes** until Euler publishes it. See [Publishing and versions](/curate/toolbox/publishing).
### Descriptions
Keep descriptions factual, with no endorsements. Say what the vault or product is and who configures it:
```text
An EVK lending product for selected assets, configured by Example DAO.
```
### The old way
The `euler-labels` GitHub repository and its pull-request process are legacy. The file format is kept for forks of the Euler app: [Label file format](/build/data-querying/label-file-format).
## Deployment and management of EVK vaults
| Path | Best for | Notes |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **[The Toolbox](/curate/toolbox)** | Everything a curator does day to day: create a market, add a vault, change caps, LTVs, rate models, routes, hooks, fees; transfer governance; pause | Stages, simulates, re-reads the chain before signing, reads back after the receipt. Signs from a wallet, a Safe or a timelock and works with [governor contracts](/curate/governance-contracts). Deploys adapters and rate models from inside the market; labels the vaults you create. |
| **[euler-vault-scripts](https://github.com/euler-xyz/euler-vault-scripts)** | Teams that define large clusters in code and want repeatable, reviewed deployments | Solidity scripts for assets, LTVs, oracles, caps, IRMs; applies only the differences on update; compatible with Safes, timelocks and risk stewards. See the [scripts guide](./euler-vault-scripts). |
The Creator UI at create.euler.finance redirects to the Toolbox. Whatever deployed a market, the Toolbox opens it by any vault address and manages it from there.
Start with [Open a market](/curate/toolbox/market-ops) or [Create a market or add a vault](/curate/toolbox/market-ops-create).
## Donation attacks
### Introduction
This scenario illustrates a worst-case hypothetical attack on a lending protocol that relies on exchange-rate manipulation of ERC-4626 vaults. Specifically, it focuses on a protocol that lists an ERC-4626 share token as both collateral and a borrowable asset, and uses the vault's share-to-asset conversion to value those shares in terms of the underlying asset.
This scenario depends on the exact assumptions below. Exploring it helps identify mitigations that can reduce similar risks in other configurations.
The described sequence requires direct donations to change the share conversion consumed by lending valuation. EVK's internal cash accounting breaks that assumption for an EVK vault's own shares. It does not make every ERC-4626 collateral or oracle integration safe: external share vaults, oracle routes, recursive collateral paths, liquidity, and redeemability can introduce different risks.
### Attack
#### Initial Setup
**System Configuration**:
* ERC-4626 Vault: Allows depositing ABC to receive wABC
* Lending Protocol: Uses the ABC/wABC exchange rate to value wABC
* Collateral & Borrowing Rules:
* wABC as Collateral to borrow USDC: 0.8 LTV (80% of wABC value can be borrowed)
* USDC as Collateral to borrow wABC: 0.8 LTV (80% of USDC value can be borrowed)
#### Required attack conditions
The numerical sequence previously shown here did not reconcile share supply, account balances, collateral, and debt. The mechanism is clearer when stated as the conditions an attacker would need:
1. **Manipulable share conversion:** unsolicited underlying transfers must increase the share-to-asset conversion used by the lending protocol's valuation path.
2. **Useful market relationships:** the affected share token must be accepted in collateral or borrowing relationships that let the attacker turn the manipulated valuation into extractable assets.
3. **Concentrated share supply:** the attacker must be able to reduce effective outstanding share supply enough that a donation materially changes the conversion rate, while retaining or controlling shares that benefit from the change.
4. **Sufficient liquidity and limits:** available liquidity, supply caps, borrow caps, LTVs, and liquidation constraints must permit the position and extraction path.
5. **Economic viability:** assets extracted must exceed donations, financing costs, swap costs, transaction fees, liquidation losses, and any flash-loan fee.
If any required condition fails, this exact path fails. A complete assessment must trace the vault's actual accounting, share ownership, oracle route, connected markets, caps, liquidity, and every asset movement. ERC-4626 conformance alone neither proves nor disproves exposure.
### Prevention Strategies
#### 1. Prevent Exchange Rate Manipulation
The attack relies on manipulating the exchange rate within an ERC-4626 vault. Under the exact accounting assumption described here, internal balance tracking that excludes unsolicited transfers from the share conversion removes the required manipulable-conversion condition. Integrators must verify the actual vault accounting and oracle path rather than infer this property from ERC-4626 conformance.
#### 2. Avoid Vulnerable Vaults as Collateral
For ERC-4626 vaults where the exchange rate can be altered by donations, a simple mitigation strategy is to:
* Avoid listing these vaults as collateral or
* Prevent them from being borrowable in the lending protocol
Under the example's assumptions, either measure removes one of the required collateral or borrow relationships. Other market relationships can create different paths.
#### 3. Implement Supply and Borrow Caps
If vulnerable ERC-4626 vaults must be used as collateral and borrowing assets, additional safeguards can reduce the risk:
* Set conservative supply and borrow caps that do not exceed the total circulating supply of the vault's share tokens
* Caps can bound exposure and increase attack cost under the configured limits, but do not by themselves prove that an attack is unprofitable
#### 4. Use a Wrapped Exchange Rate Oracle
A carefully designed wrapped exchange rate oracle can bound extreme or rapid reported exchange-rate changes:
* Cap exchange rate increases within a set threshold
* Limit the rate of change within a single block, potentially breaking this exact atomic sequence
* This can force a multi-block strategy and add market risk without proving the broader configuration safe
**Important Note**: Some existing wrapped exchange rate oracles may still be vulnerable to this type of attack. For example, certain price feeds from third-party oracle providers report the redemption price of an asset. However, this redemption price might internally use the ERC-4626 exchange rate, which can be manipulated through donation attacks.
### Conclusion
This hypothetical attack demonstrates how exchange rate manipulation in ERC-4626 vaults can be exploited to target lending protocols that allow vulnerable vaults as both collateral and borrowable assets.
For an EVK vault's own shares, internal cash accounting breaks the direct-donation assumption used in this example. This is a mitigation of the described mechanism under its stated assumptions, not a guarantee for external ERC-4626 collateral, oracle routing, liquidity, redemption restrictions, caps, or recursive dependencies. Supply and borrow caps can bound exposure but do not establish unprofitability or safety.
## Cluster deployment and management using scripts
The [`euler-vault-scripts`](https://github.com/euler-xyz/euler-vault-scripts) repository provides a script-based framework for deploying, configuring, and managing clusters of EVK vaults. It is intended for advanced users, DAOs, and protocol developers who need automation and support for complex, governed markets.
### What is a cluster?
A cluster is a collection of vaults that accept each other as collateral and share a common governor. Clusters are defined and managed in Solidity scripts, enabling programmable and reproducible market deployments that can be reviewed before execution.
### Key features
* Automated deployment and delta management
* Support for Safe multisigs, timelocks, and risk stewards
* Batching, emergency operations, and governance contract integration
### Defining a cluster: example
Below are annotated snippets from a typical cluster script (`Cluster.s.sol`).
#### 1. Define cluster assets
```solidity
function defineCluster() internal override {
// List the assets for which vaults will be deployed
cluster.assets = [WETH, USDC, USDT, sUSDS];
}
```
*This sets up the vaults in your cluster. Each asset will have its own vault. Do not define more than one vault per asset.*
#### 2. Configure cluster parameters
```solidity
function configureCluster() internal override {
// Set the governor addresses for vaults and oracle routers
cluster.oracleRoutersGovernor = getDeployer();
cluster.vaultsGovernor = getDeployer();
// Set the unit of account (e.g., USD)
cluster.unitOfAccount = USD;
// Percentage values use 1e4 = 100%.
cluster.feeReceiver = address(0);
cluster.interestFee = 0.1e4; // 10%
cluster.maxLiquidationDiscount = 0.15e4; // 15%
cluster.liquidationCoolOffTime = 1; // seconds
// Set hooks, config flags, etc. as needed
cluster.hookTarget = address(0);
cluster.hookedOps = 0;
cluster.configFlags = 0;
}
```
*This block configures governance, risk, and operational parameters for the cluster. You can override parameters per asset if needed.*
#### 3. Set oracle providers
```solidity
// Assign oracle adapters or external vaults for each asset
cluster.oracleProviders[WETH ] = "0x10674C8C1aE2072d4a75FE83f1E159425fd84E1D";
cluster.oracleProviders[USDC ] = "0x6213f24332D35519039f2afa7e3BffE105a37d3F";
cluster.oracleProviders[USDT ] = "0x587CABe0521f5065b561A6e68c25f338eD037FF9";
cluster.oracleProviders[sUSDS] = "ExternalVault|0xD0dAb9eDb2b1909802B03090eFBF14743E7Ff967";
```
*Assets used in priced borrowing relationships need the required quote route. Use `ExternalVault|` only when the intended route should consume a reviewed ERC-4626 `convertToAssets` conversion and no direct pair oracle should take precedence. Apply the manipulation, decimals, redeemability, liquidity, and recursive-dependency checks in [Oracle adapters and routes](/curate/oracle-routes).*
Deploy your own oracle adapters for the intended routes — the [Toolbox](/curate/oracle-routes) deploys the available adapter types — rather than reusing adapters discovered onchain. If you do reuse one, verify chain, address, source, update behavior, governance, and suitability for the intended route first.
#### 4. Set supply and borrow caps
```solidity
cluster.supplyCaps[WETH ] = 10_000;
cluster.supplyCaps[USDC ] = 10_000_000;
cluster.supplyCaps[USDT ] = 10_000_000;
cluster.supplyCaps[sUSDS] = 10_000_000;
cluster.borrowCaps[WETH ] = 9_000;
cluster.borrowCaps[USDC ] = 9_000_000;
cluster.borrowCaps[USDT ] = 9_000_000;
cluster.borrowCaps[sUSDS] = type(uint256).max; // no cap
```
*Caps control the maximum supply and borrowable amounts for each vault.*
#### 5. Assign interest rate models (IRMs)
```solidity
uint256[4] memory irmETH = [uint256(0), uint256(194425692), uint256(41617711740), uint256(3865470566)];
uint256[4] memory irmUSD = [uint256(0), uint256(399976852), uint256(39767751304), uint256(3865470566)];
cluster.kinkIRMParams[WETH ] = irmETH;
cluster.kinkIRMParams[USDC ] = irmUSD;
cluster.kinkIRMParams[USDT ] = irmUSD;
```
*Interest rate models are set per asset. Use the provided scripts/utilities or the [Toolbox](/curate/interest-rate-models) to deploy and preview interest-rate models as needed.*
#### 6. Configure LTVs and liquidation parameters
```solidity
// Liquidation LTV matrix: columns = liability vaults, rows = collateral vaults
cluster.ltvs = [
// WETH USDC USDT sUSDS
[uint16(0.00e4), 0.85e4, 0.85e4, 0.00e4], // WETH
[uint16(0.87e4), 0.00e4, 0.95e4, 0.00e4], // USDC
[uint16(0.87e4), 0.95e4, 0.00e4, 0.00e4], // USDT
[uint16(0.87e4), 0.95e4, 0.95e4, 0.00e4] // sUSDS
];
```
#### 7. Configure spread LTV
```solidity
// Set the spread LTV for the entire cluster
cluster.spreadLTV = 0.02e4; // 2% spread
```
*The spread LTV represents the difference between the liquidation threshold and the maximum LTV for all assets in the cluster. This creates a buffer zone before liquidation can occur, but it does not prevent liquidations during price moves, oracle updates, liquidity changes, or execution delays.*
### Environment setup and running scripts
#### Prerequisites
1. Install Foundry:
```bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
```
2. Clone the repository:
```bash
git clone https://github.com/euler-xyz/euler-vault-scripts.git
cd euler-vault-scripts
```
3. Prepare the `.env` file using `.env.example` as a template. Define the RPC URLs for all the chain IDs you need. If you plan t프로젝트로 돌아가기