Skip to content

Calculate and Store Base Reserve During Initialization #27

@phertyameen

Description

@phertyameen

Goal

Compute and persist required base reserve when the account is initialized.

Problem

Initialization currently does not calculate or store the required XLM reserve.

Scope

Initialization Logic

Calculate required base reserve based on:

  • Account reserve
  • Trustline entries (if applicable)
  • Store calculated amount via storage layer (Issue 1).

Constraints

  • Must use correct Stellar base reserve constants.
  • Must store in stroops.
  • No reserve transfer logic in this issue.

Acceptance Criteria

  • Base reserve is calculated during initialization.
  • Stored reserve matches expected ledger requirements.
  • Unit tests validate stored reserve value.

⚠️ Contributor Note

This change affects account lifecycle and balance safety.

Please avoid implementing based solely on AI-generated patterns.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions