Skip to main content

Monitoring: Events & Auditability

For transparency and off-chain tracking, the vault smart contract emits detailed events after every key state change. These events create an immutable, on-chain log of all significant activities.
Why are events important? Events can be monitored by blockchain indexers and front-end applications to log trades, track portfolio changes, and power analytics dashboards, providing a complete and auditable history for every vault.

Core Vault Events

The vault contract publishes two primary types of events to the Stellar ledger.

TransferEvent

This event is published whenever tokens are moved into or out of the vault.

Emitted by: deposit(), withdraw()

Data Includes:
  • token: The address of the token being transferred.
  • from: The source address.
  • to: The destination address.
  • amount: The quantity of the token transferred.

SwapEvent

This event is published after every successful trade, providing a detailed receipt of the operation.

Emitted by: All swap... functions.

Data Includes:
  • path: The sequence of token addresses used in the swap.
  • amounts: The corresponding amounts for each token in the path.
  • to: The destination address for the swapped tokens (the vault itself).

Next Steps

Full API Reference

View a detailed breakdown of all public functions in the Vault smart contract.