Skip to content

Add isolated token-to-token pool - #255

Draft
KevinMehrabi wants to merge 1 commit into
trunkfrom
feature/token-token-dex-core
Draft

Add isolated token-to-token pool#255
KevinMehrabi wants to merge 1 commit into
trunkfrom
feature/token-token-dex-core

Conversation

@KevinMehrabi

Copy link
Copy Markdown
Contributor

Summary

  • add a standalone, asset-agnostic FA2-to-FA2 constant-product pool
  • fix fees at 25 bp for liquidity providers and 5 bp for the protocol
  • integrate LP accounting and permanently lock the minimum initial liquidity
  • verify every underlying transfer against authenticated before/after pool balances
  • add pause-safe withdrawals, separate protocol-fee accounting, and two-step administrator handoff
  • add environment-only deployment tooling with an offline Michelson storage-encoding test and an explicit mainnet confirmation guard
  • add scoped CI, deployment documentation, and an internal security review

Why

The repository needs a token-to-token pool that does not inherit unrelated native-XTZ, baker, auction, reward-bucket, flash-loan, or multi-pair custody responsibilities. This implementation isolates one immutable FA2 pair per deployment and keeps all live token, administrator, fee-recipient, and metadata values outside source control.

Validation

  • LIGO 1.11.5 compilation reproduced the checked-in Michelson byte-for-byte
  • compiled artifact SHA-256: e80be7e08aed3782c338472d1faa578d73719414f2b80254a10df5c7300f6268
  • encoded contract size: 18,999 bytes
  • 12 end-to-end LIGO tests pass
  • TypeScript type checking passes
  • 7 deployment/configuration tests pass, including compiled-schema storage encoding
  • npm ci --ignore-scripts succeeds
  • npm audit --omit=dev --audit-level=moderate reports zero vulnerabilities for the deployment package

Review and deployment gates

This remains a draft pending independent source and Michelson review. Before mainnet deployment:

  • reproduce and approve the exact compiled artifact
  • allowlist the exact two non-taxed FA2 contracts, token IDs, callback behavior, and administrative controls
  • rehearse initialization, swaps in both directions, deposits, withdrawals, fee claims, pause behavior, and administrator acceptance on testnet
  • confirm the final administrator and immutable fee recipient on-chain
  • confirm UI/router pool allowlisting, deadline handling, and minimum-output handling

The integrated LP entrypoints intentionally accept singleton requests rather than advertising batch-complete FA2 behavior.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant