Skip to content

tests(pool): verify existing LP balances are already valid under the new SEP-41 balance() with no migration needed #761

Description

@K1NGD4VID

Summary

Since the SEP-41 balance()/total_supply() functions (per the design doc) read the exact same DataKey::LPShares/DataKey::TotalShares storage that deposit()/withdraw() already populate, existing depositors' balances should already be valid under the new interface with no data migration script needed. This needs to be verified with a test, not assumed, since an incorrect assumption here would mean existing testnet LPs silently lose access to their position.

Acceptance Criteria

  • Test added to contracts/pool/src/test.rs that deposits via the pre-SEP-41 deposit() path, then reads the resulting balance via the new balance() function and confirms they match exactly, with no migration step run in between
  • If a gap is found (balances don't already line up), document the specific mismatch and scope a real migration issue instead of silently working around it
  • Test added/updated and passing (cargo test)

Tech Stack

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

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions