Skip to content

chore(pool): MIN_INITIAL_DEPOSIT constant lives in lib.rs instead of constants.rs #592

Description

@K1NGD4VID

Summary

contracts/pool/src/constants.rs exists specifically to hold shared numeric constants (currently just the re-exported TTL_THRESHOLD/TTL_EXTEND_TO), but MIN_INITIAL_DEPOSIT — a pool-specific economic constant used to gate the first deposit (contracts/pool/src/lib.rs lines 18-21, 170) — is defined directly in lib.rs instead.

Current Behavior

// lib.rs
pub const MIN_INITIAL_DEPOSIT: u128 = 10_000_000;

lives alongside contract logic rather than in constants.rs, which is pub use constants::*;-re-exported from lib.rs and is where a reader would expect to find contract-wide tunable numeric constants.

Expected Behavior

MIN_INITIAL_DEPOSIT (and, per the related magic-number finding, a DEFAULT_MAX_UTILIZATION_BPS) should live in constants.rs alongside the TTL constants, keeping all tunable numeric parameters in one file.

Acceptance Criteria

  • Move MIN_INITIAL_DEPOSIT into constants.rs.
  • Update lib.rs to reference it via the existing pub use constants::*; re-export.
  • All existing tests referencing crate::MIN_INITIAL_DEPOSIT continue to compile/pass unchanged.

Tech Stack

Rust / Soroban SDK, contracts/pool/src/lib.rs, contracts/pool/src/constants.rs.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions