> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superearn.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart contracts

> On-chain contracts for Superearn. Key addresses, interfaces, and events for integrators.

### 1. Architecture Overview

See [How SuperEarn Works](https://docs.superearn.io/en/protocol/how-superearn-works) and [Core components](https://docs.superearn.io/en/developers/core-components).

***

### 2. Deployed Contract Addresses

#### Kaia Contracts

| Contract                                                                                                       | Description                                                                                                   | Address                                      |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| [SuperEarnRouter](https://kaiascan.io/address/0x7437892A3e2E658038758dD7CA638334C0c2006C)                      | Unified router for user deposits/withdrawals                                                                  | `0x7437892A3e2E658038758dD7CA638334C0c2006C` |
| [CooldownVault](https://kaiascan.io/address/0x4E4654cE4Ca7ff0ba66a0A4a588A4bd55A6f9A33)                        | Manages withdrawal cooldown periods                                                                           | `0x4E4654cE4Ca7ff0ba66a0A4a588A4bd55A6f9A33` |
| [OriginVault](https://kaiascan.io/address/0x3B37DB3AC2a58f2daBA1a7d66d023937d61Fc95b)                          | Cross-chain hub (ERC-7540‑like) that holds USDT earmarked for remote deployment                               | `0x3B37DB3AC2a58f2daBA1a7d66d023937d61Fc95b` |
| [StrategyOriginVault](https://kaiascan.io/address/0x650a4c074a58B18fbEEd48ae766e58a382D9E5F5)                  | Super Vault strategy that routes capital into OriginVault                                                     | `0x650a4c074a58B18fbEEd48ae766e58a382D9E5F5` |
| [StrategyUSDOExpress](https://kaiascan.io/address/0x6090d8EECB74058bC53BB24273345Dd8Ba5652bF)                  | Super Vault strategy for USDO (OpenEden)                                                                      | `0x6090d8EECB74058bC53BB24273345Dd8Ba5652bF` |
| [Custom strategy adapter](https://kaiascan.io/address/0x723d3422788f47f5DaE153515A3C277293dbd8f3)              | Super Vault strategy that holds CustomVault shares; routes USDT into the Kaia custom-strategy stack           | `0x723d3422788f47f5DaE153515A3C277293dbd8f3` |
| [CustomVault](https://kaiascan.io/address/0x7876a2faf6Aad1F6F8E47AD612D9472a4821DfDa)                          | ERC-4626 USDT vault on Kaia holding funds for registered CustomStrategies                                     | `0x7876a2faf6Aad1F6F8E47AD612D9472a4821DfDa` |
| [CustomStrategy (Yield8)](https://kaiascan.io/address/0x8F19e66B4bA81fAAe964232Baa2Bdc8118385822)              | Manually operated CustomStrategy targeting Yield8 (wYield8), managed by CustomVault via allowlisted execution | `0x8F19e66B4bA81fAAe964232Baa2Bdc8118385822` |
| [StrategyMorphoV2Vault (Feather USDT)](https://kaiascan.io/address/0x1045626a4b79A40827DD3087e06Dcc73c590d575) | Super Vault strategy targeting Feather USDT (Morpho V2 vault on Kaia)                                         | `0x1045626a4b79A40827DD3087e06Dcc73c590d575` |
| [Yield8AssetsProvider](https://kaiascan.io/address/0x1CFd5d5268400648c2FFaf9bdB01cB6b0b58F672)                 | External assets provider that values the Yield8 CustomStrategy position in USDT                               | `0x1CFd5d5268400648c2FFaf9bdB01cB6b0b58F672` |
| [USDOKyced](https://kaiascan.io/address/0x4Bfc1773280689d17c8c00B2514A5C28c8c2b021)                            | KYC-ed USDO Minter Contract (OpenEden)                                                                        | `0x4Bfc1773280689d17c8c00B2514A5C28c8c2b021` |
| [OriginAdapter](https://kaiascan.io/address/0x8E53CdAa89381c203a074fB3388f65936358f200)                        | Cross-chain adapter + bridge entry (Rhino + CCIP)                                                             | `0x8E53CdAa89381c203a074fB3388f65936358f200` |
| [OriginAgent](https://kaiascan.io/address/0xd8acFF2E2B8B1Cf052aca4Ba331743F73C569E68)                          | Cross-chain message/bridge agent for Kaia side                                                                | `0xd8acFF2E2B8B1Cf052aca4Ba331743F73C569E68` |
| [OriginAccountant](https://kaiascan.io/address/0x55CEd8F290256E165d3f50EDa0b60E261ec38f55)                     | Bridge accountant tracking assets in transit                                                                  | `0x55CEd8F290256E165d3f50EDa0b60E261ec38f55` |
| [PriceConverter](https://kaiascan.io/address/0xC090e88bDAA823B7C1dd8d9e24CbacB0f35f2675)                       | Asset price converter with Orakl oracle integration                                                           | `0xC090e88bDAA823B7C1dd8d9e24CbacB0f35f2675` |
| [Registry](https://kaiascan.io/address/0xea8e1872aDCE77eFBe5d6FE37b5C257Cc86eC786)                             | Vault and strategy registry                                                                                   | `0xea8e1872aDCE77eFBe5d6FE37b5C257Cc86eC786` |
| [Super Vault](https://kaiascan.io/address/0x2e4e573D86c70688cD97D76bc5DDc1Bb265bF5D6)                          | Aggregation vault on Kaia (EarnUSDT shares; underlying = CooldownVault shares)                                | `0x2e4e573D86c70688cD97D76bc5DDc1Bb265bF5D6` |
| [CrosschainKeeper](https://kaiascan.io/address/0x40FB0F9084828ADBc3dcd71840eA545BF243cD0F)                     | Manages crosschain asset lifecycle                                                                            | `0x40FB0F9084828ADBc3dcd71840eA545BF243cD0F` |
| [LightKeeper](https://kaiascan.io/address/0x8c82B2feC291a43e41aA87669eaEf01F4efaA3B2)                          | Performs strategy harvesting, CooldownVault repayment, and user claiming                                      | `0x8c82B2feC291a43e41aA87669eaEf01F4efaA3B2` |

#### Ethereum Contracts

| Contract                                                                                                          | Description                                                                | Address                                      |
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------- |
| [SuperEarnRouter](https://etherscan.io/address/0xd8acFF2E2B8B1Cf052aca4Ba331743F73C569E68)                        | Router used by RemoteVault/keepers for remote Super Vault flows            | `0xd8acFF2E2B8B1Cf052aca4Ba331743F73C569E68` |
| [RemoteVault](https://etherscan.io/address/0x8c82B2feC291a43e41aA87669eaEf01F4efaA3B2)                            | Vault that receives and manages cross-chain assets from Kaia               | `0x8c82B2feC291a43e41aA87669eaEf01F4efaA3B2` |
| [CooldownVault](https://etherscan.io/address/0x8E53CdAa89381c203a074fB3388f65936358f200)                          | Remote CooldownVault (USDC) backing the Ethereum Super Vault               | `0x8E53CdAa89381c203a074fB3388f65936358f200` |
| [CooldownVault (USDT)](https://etherscan.io/address/0x1c097dFe13B0f511d987F7ea6077B7fb637EC83C)                   | Remote CooldownVault for USDT backing the Ethereum USDT Super Vault        | `0x1c097dFe13B0f511d987F7ea6077B7fb637EC83C` |
| [Super Vault](https://etherscan.io/address/0x9E3E70f4d09bcfe08F456C426EB90f7aA6F70dF2)                            | Remote aggregation vault (underlying = Remote CooldownVault shares)        | `0x9E3E70f4d09bcfe08F456C426EB90f7aA6F70dF2` |
| [Super Vault (USDT)](https://etherscan.io/address/0x7Eec57beB20576Cb35c500aE5826e16960aA878b)                     | Remote aggregation vault for USDT (underlying = CooldownVault USDT shares) | `0x7Eec57beB20576Cb35c500aE5826e16960aA878b` |
| [MorphoStrategy (Prime)](https://etherscan.io/address/0xa41432A67A60A79f45ddfD9e242E72b91c8ea19d)                 | Super Vault strategy targeting Gauntlet USDC Prime                         | `0xa41432A67A60A79f45ddfD9e242E72b91c8ea19d` |
| [MorphoStrategy (RWA)](https://etherscan.io/address/0x1f5b386243C42c7f297f084269b8F85636ef5a61)                   | Super Vault strategy targeting Gauntlet USDC RWA                           | `0x1f5b386243C42c7f297f084269b8F85636ef5a61` |
| [CustomStrategy (USDC Multi-Morpho)](https://etherscan.io/address/0x50519a3AF6C0662134Ed7F9a160142D28D10f455)     | USDC strategy distributing capital across multiple Morpho markets          | `0x50519a3AF6C0662134Ed7F9a160142D28D10f455` |
| [CustomStrategy (USDT Multi-Morpho)](https://etherscan.io/address/0xCECe82A34902aA1b7Cb6419dbcb2FED893496Faa)     | USDT strategy distributing capital across multiple Morpho markets          | `0xCECe82A34902aA1b7Cb6419dbcb2FED893496Faa` |
| [CustomStrategy (Pendle PT-USDG)](https://etherscan.io/address/0x72301DDb480d4a11B168F886bD4e766De0724199)        | Custom strategy targeting Pendle PT-USDG                                   | `0x72301DDb480d4a11B168F886bD4e766De0724199` |
| [CustomStrategy (Pendle PT-sNUSD)](https://etherscan.io/address/0x947ae1c8eAaC50DA2Bd14E3230361f986a2A59eB)       | Custom strategy targeting Pendle PT-sNUSD                                  | `0x947ae1c8eAaC50DA2Bd14E3230361f986a2A59eB` |
| [CustomStrategy (Pendle PT-reUSD)](https://etherscan.io/address/0x3e92a93C7Ae3c0D7ACa27190b92f0F2db09BeCC7)       | Custom strategy targeting Pendle PT-reUSD                                  | `0x3e92a93C7Ae3c0D7ACa27190b92f0F2db09BeCC7` |
| [CustomStrategy (stUSDS)](https://etherscan.io/address/0xE2c3082dF0Ea5F3606E7adF6AAB1B559A03b5AB4)                | Custom strategy targeting stUSDS (Sky DSR)                                 | `0xE2c3082dF0Ea5F3606E7adF6AAB1B559A03b5AB4` |
| [PendleUSDGAssetsProvider](https://etherscan.io/address/0x2572E15F1C0806bB6D8Efc0d867CAA27bFaEdC40)               | Provides asset accounting for the Pendle PT-USDG strategy                  | `0x2572E15F1C0806bB6D8Efc0d867CAA27bFaEdC40` |
| [PendleSNUSDAssetsProviderV2](https://etherscan.io/address/0x20e985976AB18260995660636c5716D2f4FC4AdC)            | Provides asset accounting for the Pendle PT-sNUSD strategy                 | `0x20e985976AB18260995660636c5716D2f4FC4AdC` |
| [PendleReUSDAssetsProvider](https://etherscan.io/address/0xdB0C1338C127840043CafdB208c956D24D71FB30)              | Provides asset accounting for the Pendle PT-reUSD strategy                 | `0xdB0C1338C127840043CafdB208c956D24D71FB30` |
| [StUSDSAssetsProvider](https://etherscan.io/address/0x84e63D6AE32654bCdD5301e01E703959Ac7a622c)                   | Provides asset accounting for the stUSDS strategy                          | `0x84e63D6AE32654bCdD5301e01E703959Ac7a622c` |
| [MultiMorphoDirectAssetsProvider (USDC)](https://etherscan.io/address/0x13CEE5Ac81a78f23Be0B3846e9D5B622d62f3785) | Provides asset accounting for the USDC Multi-Morpho strategy               | `0x13CEE5Ac81a78f23Be0B3846e9D5B622d62f3785` |
| [MultiMorphoDirectAssetsProvider (USDT)](https://etherscan.io/address/0xD49162a9279441f9f12e199B0a28499Fb85b8fb5) | Provides asset accounting for the USDT Multi-Morpho strategy               | `0xD49162a9279441f9f12e199B0a28499Fb85b8fb5` |
| [PendlePT sNUSD Diamond](https://etherscan.io/address/0x3311D2A0D88597dA3bE946AA4d0D112b486bFDE8)                 | Diamond proxy for Pendle PT sNUSD strategy                                 | `0x3311D2A0D88597dA3bE946AA4d0D112b486bFDE8` |
| [PendlePT cUSD Diamond](https://etherscan.io/address/0xA5540e13F476b597D7A8708e7cAA2Eb05C58E295)                  | Diamond proxy for Pendle PT cUSD strategy                                  | `0xA5540e13F476b597D7A8708e7cAA2Eb05C58E295` |
| [PendlePT cUSDO Diamond](https://etherscan.io/address/0x609c1701EF5156E3c01BdbF80CE5eD1941dd2387)                 | Diamond proxy for Pendle PT cUSDO strategy                                 | `0x609c1701EF5156E3c01BdbF80CE5eD1941dd2387` |
| [USDOKycedCA](https://etherscan.io/address/0xc693A80b13763B3C69CCEed4c434E9f1CFC03f77)                            | KYC-ed USDO Minter Contract on Ethereum (OpenEden)                         | `0xc693A80b13763B3C69CCEed4c434E9f1CFC03f77` |
| [Adapter](https://etherscan.io/address/0xC090e88bDAA823B7C1dd8d9e24CbacB0f35f2675)                                | Cross-chain adapter + bridge entry (Rhino + CCIP)                          | `0xC090e88bDAA823B7C1dd8d9e24CbacB0f35f2675` |
| [Agent](https://etherscan.io/address/0x4AFd6Ad5b924CD29513d1fb9b66728C4C5A1bd3e)                                  | Cross-chain message/bridge agent for Ethereum side                         | `0x4AFd6Ad5b924CD29513d1fb9b66728C4C5A1bd3e` |
| [Accountant](https://etherscan.io/address/0x40FB0F9084828ADBc3dcd71840eA545BF243cD0F)                             | Bridge accountant tracking assets in transit                               | `0x40FB0F9084828ADBc3dcd71840eA545BF243cD0F` |
| [PriceConverter](https://etherscan.io/address/0x57B71db8c039aD34b28c289272EFa09b5A870c20)                         | Asset price converter with oracle integration                              | `0x57B71db8c039aD34b28c289272EFa09b5A870c20` |
| [Registry](https://etherscan.io/address/0x0Becde49394d537B240c0272A7C5fEfC932691fe)                               | Vault and strategy registry                                                | `0x0Becde49394d537B240c0272A7C5fEfC932691fe` |
| [UniversalSwapRouter](https://etherscan.io/address/0x91CAAe299305a8133F295a59f4F22005d16EB65d)                    | Unified DEX swap router                                                    | `0x91CAAe299305a8133F295a59f4F22005d16EB65d` |
| [USDCToSNUSDCurveSwapper](https://etherscan.io/address/0xdcc82aB8ABdCBedf1f42083300b13D1fa616A514)                | Curve-based swapper for USDC → sNUSD conversions                           | `0xdcc82aB8ABdCBedf1f42083300b13D1fa616A514` |
| [USDCToCUSDOSwapper](https://etherscan.io/address/0xF74550DE1d4B4Ff41ad44FD5eF26ACB5200525e8)                     | Swapper for USDC → cUSDO conversions                                       | `0xF74550DE1d4B4Ff41ad44FD5eF26ACB5200525e8` |
| [CrosschainKeeper](https://etherscan.io/address/0x1D68a6CEFeD44101eD79a830e8a5ad5c0A52D8De)                       | Manages crosschain asset lifecycle                                         | `0x1D68a6CEFeD44101eD79a830e8a5ad5c0A52D8De` |
| [LightKeeper](https://etherscan.io/address/0xd064f89A9A95EA86A706543449D0d97557fAF929)                            | Performs strategy harvesting, CooldownVault repayment, and user claiming   | `0xd064f89A9A95EA86A706543449D0d97557fAF929` |

> **Integrator note:** Treat addresses as constants in production, but keep them configurable for upgrades if needed.

***

### 3. Core Interfaces

This subsection lists only the parts of each interface that integrators typically need. Full ABIs are available from the protocol’s published JSON artifacts (ISuperEarnRouter, ICooldownVault, IVault) and standard OpenZeppelin ABIs.

#### 3.1 `ISuperEarnRouter` (SuperEarnRouter)

**Purpose**
Single entrypoint for deposits and redeems. Handles the full flow between USDT, CooldownVault, and Super Vault. **All user/integrator writes must go through this router; CooldownVault deposits/redeems are restricted to protocol contracts. Claims are permissionless but typically executed by keepers.**

**Key events**

```solidity theme={null}
event Deposited(
    address indexed sender,
    address indexed receiver,
    address indexed SuperVault,
    uint256 underlyingAmount,
    uint256 yShares
);

event Redeemed(
    address indexed sender,
    address indexed receiver,
    address indexed SuperVault,
    uint256 yShares,
    uint256 ySharesFilled,
    uint256 requestId,
    uint256 underlyingAmount
);
```

**Key read function**

```solidity theme={null}
function registry() external view returns (address);
```

Returns the registry contract used to resolve / validate vaults.

**Deposit functions**

```solidity theme={null}
// Basic deposit: receiver = msg.sender
function deposit(
    address SuperVault,
    uint256 amount,
    uint256 minSharesOut
) external returns (uint256 yShares);

// Deposit for arbitrary receiver
function deposit(
    address SuperVault,
    uint256 amount,
    address receiver,
    uint256 minSharesOut
) external returns (uint256 yShares);

// Single‑tx deposit using EIP‑2612 permit on underlying token
function depositWithPermit(
    address SuperVault,
    uint256 amount,
    address receiver,
    uint256 minSharesOut,
    uint256 deadline,
    uint8 v,
    bytes32 r,
    bytes32 s
) external returns (uint256 yShares);
```

* `amount` – USDT amount (6 decimals).
* `minSharesOut` – minimal acceptable SuperVault shares (slippage protection).
* `receiver` – address that receives SuperVault shares (optional overload).

**Redeem / preview functions**

```solidity theme={null}
// Estimate yShares → underlying
function previewDeposit(address SuperVault, uint256 amount)
    external
    view
    returns (uint256 yShares);

function previewRedeem(address SuperVault, uint256 yShares)
    external
    view
    returns (uint256 assets);

function previewWithdraw(address SuperVault, uint256 assets)
    external
    view
    returns (uint256 ySharesNeeded);

// Initiate cooldown redemption
function redeem(
    address SuperVault,
    uint256 yShares,
    uint256 minAssetsOut
) external returns (uint256 requestId);

function redeem(
    address SuperVault,
    uint256 yShares,
    address receiver,
    uint256 minAssetsOut
) external returns (uint256 requestId);
```

* `previewRedeem` returns the **expected underlying** after cooldown, given current share price.
* `previewWithdraw` returns the Super Vault shares required for a target asset amount.
* `redeem` burns SuperVault shares and creates a CooldownVault redeem request; the ID is returned as `requestId` and also emitted in `Redeemed`.

**Vault discovery**

```solidity theme={null}
function endorsedVault(address token) external view returns (address SuperVault);
```

Returns the governance‑approved SuperVault for a given underlying token (e.g. USDT). Returns `address(0)` if no endorsed vault exists.

**Claim preview**

```solidity theme={null}
function previewClaim(address SuperVault, uint256 requestId)
    external
    view
    returns (bool isClaimable, uint256 maxAssetsOut);
```

Lets integrators check whether a cooldown request has matured and the maximum claimable amount given current CooldownVault liquidity.

**Notable custom errors** (may appear in revert messages)

* `error InsufficientShares(uint256 shortfall);` – actual yShares \< `minSharesOut`.
* `error InsufficientAssets(uint256 shortfall);` – redeem would return less than `minAssetsOut`.
* `error InvalidReceiver();` – zero receiver or other invalid receiver condition.
* `error InvalidPrice();` – sanity check on share price failed.
* `error Unauthorized();` – caller blocked when `remoteVault` gating is enabled.

#### 3.2 `ICooldownVault`

**Purpose**
A vault with **cooldown‑based withdrawals** and governance‑controlled risk parameters. It is the asset of the SuperVault and the place where redeem requests are tracked.

**Core structs**

```solidity theme={null}
struct RedeemRequest {
    address receiver;
    uint256 assets;
    uint256 cooldownRequestedTime;
    uint256 cooldownPeriod;
    bool claimed;
}

struct PredepositRequest {
    address strategy;
    uint256 shares;
    uint256 debtAssets;
    uint256 cooldownRequestedTime;
    uint256 cooldownPeriod;
    bool claimed;
}
```

**other core** (standard; not repeated here)

* `asset()`, `totalAssets()` (shares and assets are 1:1 inside CooldownVault)
* `deposit`, `mint`, `withdraw`, `redeem` (restricted to whitelisted protocol contracts)
* `previewDeposit`, `previewMint`, `previewWithdraw`, `previewRedeem` (all 1:1)

Integrators usually rely on these via view calls and Super Vault pricing, not for direct user flows (those go through the router); **do not call `deposit` / `redeem` directly. Claims are permissionless but are typically batched by protocol keepers.**

**Cooldown & redeem‑queue helpers**

```solidity theme={null}
// Global cooldown parameter
function cooldownPeriod() external view returns (uint256);

// Detailed info for a given redeem request
function redeemRequests(uint256 requestId)
    external
    view
    returns (
        address receiver,
        uint256 assets,
        uint256 cooldownRequestedTime,
        uint256 cooldownPeriod,
        bool claimed
    );

// List of unclaimed redeem requests (global)
function getUnclaimedRedeemRequestIds()
    external
    view
    returns (uint256[] memory requestIds);

function getUnclaimedRedeemRequestIds(uint256 limit, uint256 skip)
    external
    view
    returns (uint256[] memory requestIds);
```

These functions let you:

* Inspect cooldown status for a specific `requestId`.
* Enumerate unclaimed requests for monitoring or backfill.
* Track current liquidity via `assetBalance()` / `idleBalance()`.

**Claiming cooled‑down redemptions**

Implementation provides a `claim(requestId, maxLossBps)` function (name may vary slightly) that:

* Transfers underlying `assets` to the receiver (anyone can call as long as `maxLossBps` is within the configured threshold, otherwise only the receiver).
* Applies a `maxLossBps` bound (basis points of tolerated loss vs expected assets).
* Emits a `Claimed` event on success.

#### 3.3 `IVault` (SuperVault / kSuperVault)

**Purpose**
Vault that wraps the CooldownVault shares. Users hold SuperVault shares as their EarnUSDT position.

**Selected view functions**

```solidity theme={null}
// ERC20
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint256);
function totalSupply() external view returns (uint256);
function balanceOf(address) external view returns (uint256);

// Vault specifics
function token() external view returns (address);      // Underlying = CooldownVault
function totalAssets() external view returns (uint256);
function pricePerShare() external view returns (uint256);
```

Integrator usage:

* **Portfolio display:** use `balanceOf(user)` on the Super Vault and multiply by `pricePerShare()` (scaled by `10 ** decimals()`) to convert shares to underlying USDT notionals.
* **Price checks:** `totalAssets()`, `totalSupply()`, and `pricePerShare()` to compute share value.

#### 3.4 Strategies (`IStrategyCooldownAware`, StrategyERC7540, etc.)

Strategy interfaces define how CooldownVault interacts with external vaults (predeposit, redeem, claim, supply caps). They emit their own events (`Preminted`, `PredepositDebtRepaid`, `AdjustPosition`, …).

Integrators **do not** need to call strategies directly. They are relevant only if you’re running protocol‑level analytics or risk monitoring.

***

### 4. Events to Monitor

Events are the primary way to track user‑level and system‑level changes from off‑chain services, indexers, and alerting systems.

#### 4.1 SuperEarnRouter (ISuperEarnRouter)

From `seprojectrouter-events.md`:

```solidity theme={null}
event Deposited(
    address indexed sender,
    address indexed receiver,
    address indexed SuperVault,
    uint256 underlyingAmount,
    uint256 yShares
);

event Redeemed(
    address indexed sender,
    address indexed receiver,
    address indexed SuperVault,
    uint256 yShares,
    uint256 ySharesFilled,
    uint256 requestId,
    uint256 underlyingAmount
);
```

Recommended usage:

* **Track deposits:** listen to `Deposited` and index by `sender`/`receiver`.
* **Track redemption requests:**

  * `Redeemed.requestId` → later join with CooldownVault’s redeem queue and `Claimed` events.
  * `yShares` / `underlyingAmount` for expected notional.

#### 4.2 CooldownVault (ICooldownVault)

From `cooldownvault-events.md`:

Core user‑facing events:

```solidity theme={null}
event RedeemRequested(
    address indexed caller,
    address indexed receiver,
    uint256 indexed requestId,
    uint256 assets,
    uint256 shares,
    uint256 requestedTime
);

event Claimed(
    address indexed caller,
    uint256 indexed requestId,
    uint256 assets,
    uint256 claimable
);

event InstantRedemption(
    address indexed caller,
    uint256 shares,
    uint256 assets
);
```

Governance / system events (for monitoring only):

```solidity theme={null}
event CooldownPeriodUpdated(uint256 newCooldownPeriod);
event CooldownPeriodSubmitted(uint256 newCooldownPeriod);

event GovernanceTransferred(address indexed previousGovernance, address indexed newGovernance);
event GovernanceTransferSubmitted(address indexed newGovernance);

event MaxLossThresholdUpdated(uint256 oldThreshold, uint256 newThreshold);
event Recovered(address indexed to, uint256 assets, uint256 shares);
event StrangeCooldownPeriod(uint256 maxCooldownPeriod, uint256 newCooldownPeriod);

// Strategy management
event StrategyAdded(address indexed strategy);
event StrategyRemoved(address indexed strategy);
event PredepositRequested(
    address indexed strategy,
    uint256 indexed predepositId,
    uint256 shares,
    uint256 debtAssets,
    uint256 cooldownPeriod
);
event DebtRetrieved(
    address indexed strategy,
    uint256 indexed predepositId,
    uint256 debtAssets,
    uint256 debtPayment
);
```

Recommended usage:

* **User‑level tracking:**

  * `RedeemRequested` + `Claimed` to build a full view of pending and completed withdrawals per user.
* **Risk / governance monitoring:**

  * `CooldownPeriodUpdated`, `MaxLossThresholdUpdated`, and `Emergency`‑style events to detect parameter changes.

Standard ERC‑20 events emitted by CooldownVault:

```solidity theme={null}
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);

event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares);
```

These are useful if you want to reconstruct all share‑level movements at the CooldownVault layer.

#### 4.3 SuperVault (IVault)

From `vault-events.md`:

Vault‑level operations:

```solidity theme={null}
event Deposit(address indexed recipient, uint256 shares, uint256 amount);
event Withdraw(address indexed recipient, uint256 shares, uint256 amount);
event Sweep(address indexed token, uint256 amount);
```

Strategy & governance events (aggregated behavior of all underlying strategies):

```solidity theme={null}
event StrategyAdded(address indexed strategy, uint256 debtRatio, uint256 minDebtPerHarvest,
                    uint256 maxDebtPerHarvest, uint256 performanceFee);
event StrategyReported(address indexed strategy, uint256 gain, uint256 loss,
                       uint256 debtPaid, uint256 totalGain, uint256 totalLoss,
                       uint256 totalDebt, uint256 debtAdded, uint256 debtRatio);
event StrategyRevoked(address indexed strategy);
// ... plus FeeReport, StrategyUpdate*, EmergencyShutdown, UpdateDepositLimit, etc.
```

For most integrators:

* **User PnL / position tracking** can be done directly from SuperVault share balances and price per share; you rarely need to decode strategy events.
* **Advanced analytics** may ingest these strategy events to understand how the vault is allocating capital and generating yield.

***

### 5. ABI & Integration Checklist

For an EarnUSDT integrator, the minimum on‑chain surface you typically need is:

1. **ABIs**

   * `ISuperEarnRouter`
   * `IVault` (SuperVault / kSuperVault)
   * `ICooldownVault`
   * Standard `IERC20` / `IERC20Permit` where needed for USDT and share approvals

2. **Write functions you actually call**

   * `SuperEarnRouter.deposit(...)` / `depositWithPermit(...)`
   * `SuperEarnRouter.redeem(...)`
   * (Claims on CooldownVault are permissionless but typically run by protocol keepers to bundle redemptions.)

3. **View functions you rely on**

   * `SuperEarnRouter.previewRedeem(...)`, `previewDeposit(...)`
   * `SuperEarnRouter.endorsedVault(USDT)`
   * `IVault.balanceOf(user)`, `IVault.pricePerShare()`
   * `ICooldownVault.redeemRequests(requestId)` and `getUnclaimedRedeemRequestIds(...)` (for cooldown state)

4. **Events you index**

   * `SuperEarnRouter.Deposited` / `Redeemed`
   * `CooldownVault.RedeemRequested` / `Claimed` / `InstantRedemption`
   * `IVault.Deposit` / `Withdraw` (optional, for deeper tracing)
