LogoLogo
Visit WebsiteLaunch App
  • Introduction
    • Overview
    • Getting Setup
      • Creating a Wallet
      • Security Practices
  • Product
    • Strategies
      • Conservative Yield V1
      • Balanced Yield V1
      • Advanced Yield V1
    • Nexus Mutual Cover
    • Technical Architecture
      • Technical Overview
      • Security and Authentication
      • Key Components
        • Action Smart Contracts
        • BravaGuard
        • Fee Take Safe Module
        • Smart Safe Account
        • Sequence Executor
        • Logging
          • Balance Update Log
          • BuyCover Log
          • Curve3PoolSwap Log
          • Send and Pull Token Log
    • Fees
    • Audits
  • Resources
    • Contracts
    • Website
    • Glossary
  • Socials
    • X (Twitter)
    • Discord
    • Telegram
Powered by GitBook
On this page
  • Overview
  • Logger Contract
  • Log Types
  • Integration Pattern
  • Benefits
  1. Product
  2. Technical Architecture
  3. Key Components

Logging

Overview

Our logging system provides a standardised approach to event tracking across the protocol. Through a centralised Logger contract, we maintain consistent event emission for all actions and administrative changes, creating an immutable audit trail of system activities.

Logger Contract

The Logger contract serves as the core logging infrastructure, implementing two primary event types:

Action Events

  • Tracks all protocol operations

  • Includes caller address and standardised log ID

  • Contains encoded operational data

Administrative Events

  • Records governance and configuration changes

  • Uses a structured ID system for categorisation

  • Administrative log IDs follow a pattern:

    • 1XX: Proposals

    • 2XX: Grants

    • 3XX: Cancellations

    • 4XX: Removals

Log Types

The system defines standardised log types through an enumeration:

  1. Balance Update

    • Records deposit/withdrawal operations

    • Tracks balance changes and fee collections

    • Used across all protocol integrations

  2. Protocol-Specific Logs

    • Buy Cover operations

    • Curve pool swaps

    • ParaSwap exchanges

    • Token transfers

Integration Pattern

All action contracts inherit from ActionBase, which provides standardised logging functionality:

LOGGER.logActionEvent(
    LogType.BALANCE_UPDATE,
        encodeBalanceUpdate(
            strategyId,
            poolId,
            balanceBefore,
            balanceAfter,
            feeInTokens
        )
    );

Benefits

  1. Standardisation

    • Consistent event structure across all operations

    • Type-safe log identification

    • Structured data encoding

  2. Auditability

    • Centralised event stream

    • Clear categorisation of administrative changes

    • Comprehensive operation tracking

  3. Development Experience

    • Simple integration through base contract

    • Type-safe log enumeration

    • Standardised encoding patterns

PreviousSequence ExecutorNextBalance Update Log

Last updated 4 months ago