Skip to content

Issue 22 — mock-amm.initialize doesn't validate rate_bps bounds #22

Description

@Junman140

Labels: bug, priority:low
Body:

Problem
rate_bps can be initialized to 0 or an absurdly large value, silently producing a broken pool (always-zero output, or overflow on swap).

Proposed fix
Add sane bounds checking (e.g., reject 0 and anything above a configured max) in initialize, returning an error instead of accepting garbage config.

Acceptance criteria

  • Bounds enforced
  • Test covers rejection of 0 and excessive values

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions