← Documentation home
Build · Reference

Events

Every event the metavault emits, with the payload and when it fires.

Deposits

event SeniorDeposited(
  address indexed account,
  address indexed receiver,
  uint256 assets,
  uint256 shares
);
 
event JuniorDeposited(
  address indexed account,
  address indexed receiver,
  uint256 assets,
  uint256 shares
);

Fire after the deposit completes. account is the underlying-asset payer (msg.sender); receiver is the address credited with the freshly minted lcSEN / lcJUN shares.

Withdrawal notices

event SeniorWithdrawalNoticeRequested(
  address indexed account,
  uint256 shares,
  uint256 executableAt
);
 
event SeniorWithdrawalNoticeCancelled(
  address indexed account
);
 
event JuniorWithdrawalNoticeRequested(
  address indexed account,
  uint256 shares,
  uint256 executableAt
);
 
event JuniorWithdrawalNoticeCancelled(
  address indexed account
);

*NoticeRequested events emit the cumulative noticed share count. Re-filing stacks the request, and each emission shows the current total locked. executableAt is the next-block timestamp at which the notice can be executed.

Withdrawals

event SeniorWithdrawn(
  address indexed account,
  address indexed receiver,
  uint256 shares,
  uint256 assets
);
 
event JuniorWithdrawn(
  address indexed account,
  address indexed receiver,
  uint256 shares,
  uint256 assets
);

Fire on every successful execution of withdrawSenior / withdrawJunior. shares is the burned amount of lcSEN / lcJUN; assets is the underlying transferred to receiver. There is no "claim filed" half-event. Exits are atomic.

event PooledNavSynced(
  uint256 underlyingAssets,
  uint256 seniorNav,
  uint256 juniorNav,
  int256 delta
);

Fires inside _syncAccounting() when the protocol's accounted total (seniorNav + juniorNav) is reconciled with the actual underlying value. delta is the signed change applied: positive on gain, negative on loss. The new NAVs are emitted post-application.

event ProtectionPremiumAccrued(
  uint256 elapsed,         // seconds since the last accrual
  uint256 fromSeniorNav,   // amount removed from senior
  uint256 toJuniorNav      // amount added to junior (equal to from)
);

Fires inside _accruePremium(). Skipped (no event) when premium-active conditions aren't met (rate is zero, either tranche empty, or no time elapsed).

Premium rate changes

event ProtectionPremiumRateSet(uint256 rateBps);

Fires when an OPERATOR_ROLE holder calls setProtectionPremiumRate. The rate flips atomically; _syncAccounting() runs first so the previous rate accrues up to the call. Deployments that need a delay between scheduling and activation route the role through an external TimelockController and observe its CallScheduled / CallExecuted events.

Performance fee accrual

event PerformanceFeeAccrued(
    address indexed recipient,
    uint256 gainAssets,
    uint256 feeAssets,
    uint256 feeShares
);
event PerformanceFeeRateSet(uint256 rateBps);
event FeeRecipientSet(address indexed recipient);

PerformanceFeeAccrued fires inside _syncAccounting()'s gain branch when performanceFeeBps > 0 and junior is non-empty. gainAssets is the underlying NAV gain observed on this sync; feeAssets is the slice taken (gainAssets × performanceFeeBps / BPS); feeShares is the freshly-minted parcel of lcJUN issued to recipient at the post-distribution junior unit price (so existing junior holders' share value is unchanged).

*Scheduled / *Activated mirror the premium rate pattern with the same 10-day timelock and lazy-activation behaviour. FeeRecipientSet fires from setFeeRecipient; the recipient change takes effect immediately and applies to the next gain.

Pause toggle

event DepositsPausedSet(bool paused);

Single global pause; affects both senior and junior deposits. Withdrawals are never gated by this flag.

Indexing notes