Skip to content

[CONTRACT] No on-chain event emission - AutopilotVault is not auditable on Stellar Explorer #6

Description

@thisisouvik

Description

The AutopilotVault Soroban contract in contracts/src/lib.rs has no event emission (env.events().publish()) for any action. This makes it impossible to:

  • Audit contract interactions without querying Horizon API separately.
  • Build indexers or subgraphs on top of the contract.
  • Detect re-entrancy or double-spend scenarios at the contract layer.

Expected Behavior

Every state-changing function (initialize, withdraw) should emit a Soroban event.

Suggested Fix

// In withdraw():
env.events().publish(
    (symbol_short!(withdraw), owner.clone()),
    (token_address.clone(), amount),
);

Impact

High - Without events, on-chain auditability is zero. Stellar Expert cannot surface contract activity.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveMarked as Stellar Wavebug: highHigh priority bugcontractRelated to Soroban smart contracts

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions