Skip to content

Reentrancy Guard Modifier for External Contract Calls #290

@Luluameh

Description

@Luluameh

Background
Soroban contract calls can trigger external token or custom contracts, opening vectors for reentrancy attacks if state is not updated before external calls.
Goal
Implement a reentrancy guard mechanism to prevent nested recursive invocations of critical settlement and withdrawal functions.
Acceptance Criteria

  • Define ReentrancyGuard state in transient or instance storage.
  • non_reentrant check in settle_session and withdraw_accrued.
  • Reverts transaction with Error::ReentrantCall if reentrancy is detected.
    Key Files
    contracts/src/security.rs, contracts/src/lib.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions