Skip to content

[DeFi][FIN-05][M2] Reproduce a second AMM pool through public SDK and package interfaces #55

Open

Description

@a19q3

Implementation ownership — protocol-first, no finance-specific compiler feature

Primary implementation layer: developer experience, SDK and external integration; no consensus-language work. This measures whether independent application developers can actually consume existing public package interfaces, not whether a new Pool primitive can be invented.

Implementation shape: use a fresh checkout, normal CellScript package dependency, compiler, generated builder, documented CKB adapter and exact token deployments to instantiate a second pool with different admitted tokens/parameters. Reproduce a real swap/LP transaction and record every manual workaround, diagnostic and byte identity.

Acceptance interpretation: a developer must not need to hand-modify compiled verifier bytes, patch a custom finance-only compiler, or bypass generated ABI encoding. General tooling DX bugs can be fixed at the existing SDK/compiler boundary, but new grammar is outside this issue.

Compiler-change gate (all FIN work): This issue does not authorise finance-specific grammar, IR, opcodes, codegen branches or hidden protocol semantics. First try existing general CellScript constructs. Any genuinely missing general capability needs a minimal failing application, a non-financial use case, its own narrow issue and independent checker/ABI/resource/gate acceptance as required by #43 §2.2. Application correctness and builder convenience are distinct from language support.


Parent: #43 FIN-05/M2. Owner role: developer experience / external integrator; outside developer: not yet assigned; reviewer unassigned.
Status: proposed; independent reproduction must not be claimed until actually performed.

Dependency / start condition

  • Starts once FIN-04 has a runnable generated-builder + pool package, without waiting for FIN-04 final release acceptance.
  • Consume FIN-02/03's frozen custody and numerical contracts through FIN-04; do not create a bespoke test-only verifier or bypass failing compiler/SDK contracts.
  • Work can continue alongside FIN-04 hardening. Unblocks FIN-10 final independent reproduction, but FIN-05 alone is not full programme acceptance.

Scope

  1. From documented package/API entry points, have a developer other than the implementation author initialise a second pool using a distinct admitted token pair and parameters, with exact code/deployment/asset identities.
  2. Execute real pool creation, at least one swap and a permitted LP operation through generated SDK/CKB-adapter interfaces; test rebuilding from a clean checkout and a clean package lock.
  3. Inventory manual steps (contract hashes, witness bytes, decoding, token deployment, fee/capacity, signing), API incompatibilities and errors. Treat any manual replacement of compiled verifier bytes as a failure.
  4. Correct material general DX shortcomings at their owning layer, with narrow linked issues where relevant; preserve the existing package and signing models. Record reproducible setup and accepted boundaries.

Acceptance

  • Name the external developer, independent checkout and pinned versions; publish reproducible commands, documentation and fully identified testnet/local-node environment.
  • A second pool with different assets/parameters is constructed and verified through the existing generated interfaces, with authentic token/pool/LP Scripts and no hand-encoded ABI shortcut.
  • Capture reproducible positives and malicious/invalid inputs, all-group execution, signing/preflight, actual transaction bytes, capacities and failure classifications.
  • Document manual operations and developer-visible friction; close material correctness/usability defects or link explicit accepted blockers with owners. Re-test after fixes.
  • Keep usability evidence distinct from an independent security audit, network deployment or universal Rust equivalence; apply relevant gates.

Boundaries: The repeat integration must not fork the AMM protocol or silently admit new assets with unexamined issuer powers. FIN-10 later proves the combined pool/order/settlement workflow. Ref: #43 §11, M2, M6.

Dependency cross-links (confirmed GitHub issues)

Start condition: #54 FIN-04's first genuinely executable pool plus generated SDK path, not its final closure. Required by: #60 FIN-10 independent final acceptance. This early outside-developer integration does not substitute for FIN-10's composite settlement reproduction.

Umbrella dependency graph and authoritative financial acceptance: #43.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions