Repository navigation
[DeFi][FIN-10][M6] Independent DeFi package reproduction and final acceptance #60
Description
Implementation ownership — protocol-first, no finance-specific compiler feature
Primary implementation layer: independent integration/evidence and documentation; not compiler/runtime feature implementation. Closing this issue certifies a bounded external reproduction of the DeFi protocol programme, not a new CellScript language feature.
Implementation shape: have an independent developer use ordinary language source, released/pinned package interfaces and generated builders to deploy/instantiate a second admitted pool; execute genuine AMM, order, shared-payment and route transactions; replay complete on-chain and economic failure cases. Trace exact source, checker, build, CellDep, transaction and node identities and compare independent financial models.
Acceptance interpretation: distinguish independently reproduced application correctness, audited security, core language feature coverage, node acceptance and actual public deployment. Independent DX reproduction alone does not constitute a security audit. If the exercise uncovers a general compiler gap, track it separately without retroactively treating FIN-10 as a language enhancement.
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.
Umbrella: #43 FIN-10/M6; programme-wide independent developer reproducibility and evidence closure. Reviewer and external developer: unassigned (must be named, not assumed). This issue is proposed; it does not authorise a release or public deployment.
Hard dependencies
- [DeFi][FIN-05][M2] Reproduce a second AMM pool through public SDK and package interfaces #55 FIN-05: early external second-pool integration and documented independent API experience.
- [DeFi][FIN-08][M4] Enforce shared-payment allocation and bounded multihop routes #58 FIN-08: bounded shared outputs, multihop, complete settlement C2–C4 acceptance (indirectly [DeFi][FIN-04][M2] Complete constant-product AMM/LP lifecycle with generated builders #54 FIN-04 + [DeFi][FIN-06][M3] Implement escrowed partial-fill orders and cumulative rounding #56 FIN-06 + [DeFi][FIN-07][M3] Settle an order against an AMM with enforced asset flows #57 FIN-07).
- [DeFi][FIN-09][M5] Make financial builders recover safely and benchmark contention #59 FIN-09: intent-preserving rebuild/unknown-submission recovery and full-operation benchmark evidence.
- [DeFi][FIN-02][M1] Enforce authentic pool custody, asset identity and LP supply #52 FIN-02/[DeFi][FIN-03][M1] Freeze checked financial arithmetic, rounding and reference model #53 FIN-03 authentic custody and financial correctness remain frozen prerequisites via downstream acceptance. Do not replace an unavailable acceptance with a narrative or closed issue checkbox.
Scope
- An implementation-independent developer uses documented public packages/CLI/generated builders to instantiate the second admitted AMM pool from clean sources with a different exact asset pair and parameters, then composes that pool with a real order and bounded settlement.
- Reproduce a continuous economic lifecycle: genuine token issuance → unique pool and LP issuance → liquidity operation → bidirectional swaps → multiple partial order fills → single order/pool settlement → permitted shared-payment or two-pool multihop case → authorised LP redemption.
- Run and independently classify selected adversarial transactions for reserve-only spend, forged/burned LP, rounding exploitation, payment double credit, omitted/duplicated participant, wrong asset/recipient, stale state, failed signer and unknown submission. Negative tests must reach intended enforcement rather than failing accidentally elsewhere.
- Compare accepted transactions with independent financial calculations; replay exact compiler/checker/builder/ELF/code Cell/tx data, frozen budgets, all-group CKB-VM and stateful/pinned-node reports. Check docs, package locks, source origins, toolchain and deployment/chain identities.
- Close material DX/correctness defects at owning layers or retain explicit admitted limitations, and publish a final acceptance/exception map per milestone M0–M6. Do not claim independent security review solely because an outside developer followed the workflow.
Acceptance
- A named developer genuinely outside the implementation team reproduces the second pool, real order and at least one C1 plus one bounded C2/C3 settlement via ordinary documented public interfaces—without patching generated verifier bytes or custom witness/signature hacks.
- Accepted/rejected transaction outcomes, economic model, actual shared payment allocation, full CKB Script-group execution, source/ELF/CellDep/tx hashes and predecessor lineage reproduce from clean, locked inputs.
- Missing/extra/mismatched Scripts/Cells, misallocated payments, LP custody/supply violations, replay, wrong amount/rounding, and stale/unknown builder outcomes have measured, classified adversarial cases at intended boundaries.
- All earlier FIN milestones have explicit accepted/evidence-pending/rejected statuses, no unaddressed release-blocking errors, unchanged existing budgets and reproduced new financial operation ceilings.
- Source/checker/compiler/adapter/SDK version parity, relevant dev/CI/backend and applicable release gates, scoped reviews and unresolved risk register are recorded; any review waiver is explicit and confined to its authorised scope.
- Documentation clearly separates tested feature coverage, local-node validation, application-level security review, public-network deployment and commercial asset/liquidity readiness.
Non-goals: asserting production mainnet safety, proving all DeFi financial models, unrestricted pool routing, lending, perpetuals, concentrated liquidity or silently creating new language features. Source: #43 §§11–13.
Dependency cross-links (confirmed GitHub issues)
Hard dependencies: #55 FIN-05 (outside pool integration), #58 FIN-08 (composite settlement) and #59 FIN-09 (recovery/budgets), with #52/#53/#54/#56/#57 accepted transitively. FIN-10 must not close until independent reproduction actually occurs and the full evidence/review/gate map is recorded.
Umbrella dependency graph and authoritative financial acceptance: #43.
Activity