lez-programs/CHANGELOG.md
2026-07-16 10:48:25 +02:00

19 KiB

Changelog

All notable changes to the LEZ programs in this repository are documented here. This file is generated from Conventional Commit messages by git-cliff.

[1.0.0] - 2026-07-16

⚠️ Breaking Changes

  • ata: Instruction::Transfer, Instruction::Burn, Instruction::Create now requires a token_program_id field. Any existing call site that omits it will fail to compile. (5229855)
  • amm: AddLiquidity, RemoveLiquidity, SwapExactInput, SwapExactOutput, and NewDefinition instruction variants now require a deadline field. (6b21c36)
  • Update dependencies and implement new required features across multiple modules (471abef)
  • amm: PoolDefinition Borsh serialization format has changed. Existing on-chain pool accounts encoded with the active field are incompatible with this version. (4a9a441)
  • amm: The Swap instruction variant and swap() function are renamed to SwapExactInput and swap_exact_input(). Callers must update instruction construction and any IDL-generated bindings. (4419e1e)
  • amm: NewDefinition instruction requires an additional LP-lock holding account derived via compute_lp_lock_holding_pda(amm_program_id, pool_id). (fddd6e1)

Features

  • amm:
    • Wire the AMM app to the LEZ wallet module (751d4ac)
    • Create TWAP oracle price account on behalf of the pool (53e563f)
    • Refresh TWAP current tick on every reserve-mutating instruction (0e2c5f9)
    • Bootstrap pool TWAP current-tick account at pool creation (b997ca6)
    • Create TWAP price observations on behalf of the pool (4e43389)
    • Add admin authority and UpdateConfig instruction (1d9e3dc)
    • Add Initialize instruction with config-gated chained calls (3624ea1)
    • Add transaction deadlines to swap and liquidity instructions [breaking] (6b21c36)
    • Apply trading fees to LP accounting (6c86b5b)
    • Add configurable fee tiers (9824cd8)
    • Add swap exact output instruction (664fd84)
    • Add SyncReserves instruction (e61cd59)
    • Introduce minimum liquidity lock on pool initialization [breaking] (fddd6e1)
  • amm-ui:
    • Add navbar to switch between views (0cec2e2)
  • amm/ui:
    • Show swap summary under the swap card (3df3c3d)
    • Add mock confirmation flow (a3bdc96)
    • Add slippage min received controls (d92a61f)
    • Add remove-liquidity preview (bf9001c)
    • Add liquidity deposit preview (67b1e50)
    • Add pool position summary (f5a0106)
    • Add initial AMM UI module (29d949d)
  • stablecoin:
    • Add ProtocolParameters account type (5b82a52)
    • Add fixed-point math utilities (3eab96a)
    • Implement repay_debt (cdb53a4)
    • Implement withdraw_collateral (eb7f44a)
    • Implement open_position (f4f7b45)
    • Initial stablecoin scaffold (4178406)
  • token:
    • Add mint authority model to token program (fe4c7a9)
    • Verify definition ownership via self_program_id in initialize and mint (8005c74)
  • twap-oracle:
    • Implement PublishPrice with tick-to-price conversion and tail extrapolation (c528d85)
    • Implement RecordTick instruction (e8fe634)
    • Implement CreateCurrentTickAccount and UpdateCurrentTick (3285d57)
    • Implement CreateOraclePriceAccount instruction (7461c95)
    • Implement CreatePriceObservations instruction (fe9d919)
  • Make use of spel's [#account_type] directive (f4a0aaf)

Bug Fixes

  • amm:
    • Compute pool arithmetic in u256 to avoid u128 overflow (2308681)
    • Require signer on user token holdings in swap and add-liquidity (c8f061e)
    • Validate user deposit accounts are owned by vault's token program (e69c910)
    • Use checked mul/add/sub to avoid overflows/underflows (36f78a2)
  • ata:
    • Namespace accounts by token program [breaking] (5229855)
    • Lock down ATA::Transfer recipient contract (f8cbcc6)
  • idl:
    • Align LEZ account metadata (255f87f)
  • idl-gen:
    • Sort types array for deterministic output (b0ac300)
  • integration_tests:
    • Remove no longer needed program ID (29b4c01)
  • stablecoin:
    • Leave position_post.program_owner default so the runtime sets it through Claim::Pda (7da110a)
    • Address open position review feedback (0b078b2)
  • twap_oracle:

Refactor

  • amm:
    • Derive pool active state from LP supply instead of explicit flag [breaking] (4a9a441)
  • pda:
    • Use descriptive string seeds for PDA derivation (03345db)
  • twap_oracle:
    • Match instruction function order to Instruction enum (c9fbb62)
  • Migrate programs to LEZ lez-core-v0.2.0 (c42d4b6)
  • Move programs into programs and UIs into apps (3622016)
  • Rename rust-toolchain file (20a9471)
  • Update dependencies and implement new required features across multiple modules [breaking] (471abef)

Documentation

  • stablecoin:
    • Move design document into docs folder (3774d51)
    • Remove minimum time between fee acrruals (222c01e)
    • Add refresh_globals and use milliseconds everywhere (5298c43)
    • Add more examples and debt accrual terminology (b6c53e0)
    • Fix rate adjustment math (78f61f4)
    • Improve after comments (b3369d2)
    • Fix sections references (6331115)
    • Add stablecoin design docs (7c62668)
    • Improve documentation for OpenPosition instruction (d6082d0)
    • List all five OpenPosition accounts and qualify size_of_val (e63d09f)
  • Add a testnet run book to show how to deploy and use the programs (0a120bd)
  • Update README and CLAUDE.md to reflect current state (7b1696f)

Testing

  • ata:
    • Add integration for private accounts create public ATAs (d0f3988)
  • stablecoin:
    • Move chained-transfer coverage to integration tests (1ae2b32)
    • Cover invalid withdraw transfer pre-states (a0a1e08)
  • twap:
    • Cover CreateOraclePriceAccount and PublishPrice end-to-end (bd8064a)
    • Cover RecordTick end-to-end and add zkVM cycle benchmark (9d5eea2)

Build System

  • deps:
    • Bump spel to v0.6.0 and logos-execution-zone to v0.2.0 (ff89025)
  • guest:
  • Pin enum-ordinalize to 4.3.2 in the AMM guest lockfile (4a6192d)
  • Add shared guest program build (a26debd)

CI

  • Add IDL freshness check and consolidate artifacts (94f14ae)

Chores

  • Makefile:
    • Add idl command to Makefile (f4f61be)
  • amm:
    • Add Logos Basecamp support (25b8b86)
    • Validate fee tier in sync_reserves (c8a192e)
    • Add defensive check for lp token solvency (0d532a8)
    • New_definition allows only uninitialized pools (1f8eea8)
    • Rename Swap instruction to SwapExactInput [breaking] (4419e1e)
  • amm-ui:
    • Reorganize liquidity page components (22b41bd)
    • Add layout and reorganize swap UI files (9375129)
    • Add SlippageToleranceControl (6eed55d)
    • Swap form activates exact input or output based on the fields updated (476087a)
    • Add swap confirmation modal (5a61cf3)
    • Update styles to match the liquidity page (37fc2ea)
    • Add basic swap UI for Token Pair Selector & Swap Direction (e18f0f3)
  • ata:
    • Remove redundant test directive (9ebd9fc)
    • Add IDL for ata program (6287bd9)
  • lint:
    • Add staged lint baseline (49d7f91)
  • stablecoin:
  • twap_oracle:
    • Scaffold twap_oracle program (291149b)
  • Add helper examples to calculate program PDAs (0fa2b49)
  • Update to LEZ v0.2.0-rc6 (091ea5a)
  • Add integration test task to make file (065a4e4)
  • Pin ruint dep (e444761)
  • Include stablecoin program in clippy task (cfa4bb1)
  • Adjust linting rules and introduce Makefile (6fd8776)
  • Update spel to v0.3.0 (035f593)
  • Update spel (ceb8a4b)
  • Update LEZ to v0.2.0-rc3 (e7a69f6)
  • Fix RISC-V guest build on macOS 26 (06a141e)
  • Update spel and logos-execution-zone dependencies (f89a8f9)
  • Update spel-cli references to use spel (cb8426c)

[0.1.0] - 2026-03-30

Chores

  • Initial repository setup for programs (45ed284)