Skip to main content
This page is the definitive reference for all events emitted by Vanna Protocol contracts, their XDR structure, and how to consume them via Mercury.

Event Architecture

Soroban events have up to 4 topic fields and a data field, all encoded as XDR ScVal. Vanna events use:
  • topic1: Event name (string/symbol)
  • topic2: Primary key (usually smart_account or lender address)
  • data: Struct payload with the event fields

AccountManager Events

Contract: CAK2IJIO2SKZWUODY4G7ZRIUUIIMJUUAIXE3I5YTQ5QYNSS2RYJ3P4CV

AccountCreationEvent

Emitted when a new (or reused) SmartAccount is activated.
Decode:

AccountDeletionEvent

Emitted when a margin account is closed.

TraderDepositEvent

Emitted when collateral is deposited into a SmartAccount.

TraderBorrowEvent

Emitted on every successful borrow.

TraderRepayEvent

Emitted on debt repayment.

TraderLiquidateEvent

Emitted when a margin account is liquidated.

TraderSettleAccountEvent

Emitted when all debt is repaid via settle_account().

LendingPool Events

Applies to LendingPoolXLM and LendingPoolUSDC.

deposit_event (LendingDepositEvent)

Emitted on LP deposit.

withdraw_event (LendingWithdrawEvent)

Emitted on vToken redemption.

mint_event (LendingTokenMintEvent)

Emitted when vTokens are minted (on deposit).

burn_event (LendingTokenBurnEvent)

Emitted when vTokens are burned (on redemption).

SmartAccount Events

SmartAccountActivationEvent

SmartAccountDeactivationEvent


vToken Events (MintEvent, BurnEvent, TransferEvent)

Standard token events on vXLM and vUSDC contracts.

Complete Event Decoder


Real-Time Event Streaming

Combine Mercury for history with Horizon SSE for live updates:

Building an Analytics Dashboard

The event stream provides enough data to build a full analytics dashboard: