<!-- file: docs/DEX_EVENT_COVERAGE_MATRIX.md -->

# DEX Event Coverage Matrix — `khadhroony-bobobot` `0.7.57 meteora_dlmm closed`

Cette matrice complète `docs/DEX_DECODER_MATRIX.md` avec une lecture par familles d'événements. Elle ne remplace pas la preuve locale : une entrée Git/IDL reste un indice tant qu'elle n'est pas observée dans le corpus local puis validée par replay et SQL.

## Règles de statut

| Statut | Sens |
|---|---|
| `decoded` | Un decoder local produit un event spécialisé ou un event audit-only classé. |
| `materialized` | L'event alimente une table métier existante validée par corpus. |
| `audit-only` | L'event reste dans `k_sol_dex_decoded_events` et ne produit jamais trade/candle. |
| `upstream_git_mapped_unverified` | L'entrée est connue depuis Carbon/fnzero/IDL, mais non observée localement. |
| `not_applicable` | La famille n'existe pas pour ce DEX/version ou appartient à un autre programme. |

## `0.7.48` — `raydium_cpmm`

Sources inventoriées : Carbon `carbon-raydium-cpmm-decoder`, fnzero `solana-streamer` / `sol-parser-sdk` IDL `raydium_cpmm.json`.

| Famille | Entrées Raydium CPMM | Statut `0.7.48` | Cible DB | Justification / règle |
|---|---|---|---|---|
| `swap` | `swap_base_input`, `swap_base_output`, `swap_event` | `materialized` pour `swap_base_*`; `swap_event` audit-only | `k_sol_trade_events` seulement pour `swap_base_*`; `k_sol_dex_decoded_events_only` pour `swap_event` | `swap_event` est décodé mais ne produit jamais trade/candle afin d'éviter les doublons. |
| `pool_create` | `initialize`, `initialize_with_permission` | `materialized` | `k_sol_pool_lifecycle_events` | `initialize_with_permission` est lifecycle-only et ne crée plus d'admin row. |
| `add_liquidity` | `deposit`, `lp_change_event(changeType=0)` | `materialized` | `k_sol_liquidity_events` | `deposit` et `lp_change_event(changeType=0)` matérialisent liquidity, sans trade/candle. |
| `remove_liquidity` | `withdraw`, `lp_change_event(changeType=1)` | `materialized` | `k_sol_liquidity_events` | `withdraw` et `lp_change_event(changeType=1)` matérialisent liquidity, sans trade/candle. |
| `position_open` | `-` | `not_applicable` | `-` | CPMM n'a pas de position CLMM. |
| `position_close` | `-` | `not_applicable` | `-` | CPMM n'a pas de position CLMM. |
| `fee` | `collect_creator_fee`, `collect_fund_fee`, `collect_protocol_fee` | `materialized` | `k_sol_fee_events` | Les trois familles de fee CPMM observées sont matérialisées avec `trade_count=0`. |
| `reward` | `-` | `not_applicable` | `-` | Aucune entrée reward CPMM dans Carbon/fnzero IDL inventoriée pour cette tranche. |
| `admin/config` | `create_amm_config`, `update_amm_config`, `create_permission_pda`, `update_pool_status`, `close_permission_pda` | `materialized` pour les entrées observées ; `upstream_git_mapped_unverified` pour `update_pool_status` / `close_permission_pda` | `k_sol_pool_admin_events` ou decoded-only selon corpus | `create_amm_config`, `create_permission_pda` et `update_amm_config` sont matérialisés ; les deux autres restent non observés localement. |
| `mint` | `-` direct | `not_applicable` | `-` | Mint LP implicite possible dans les instructions, mais pas d'instruction CPMM `mint` dédiée. |
| `burn` | `-` direct | `not_applicable` | `-` | Burn LP implicite possible dans `withdraw`, mais pas d'instruction CPMM `burn` dédiée. |
| `transfer` | SPL Token inner transfers | `audit-only` indirect | `k_sol_dex_decoded_events` pour cette tranche | Pas de table `k_sol_token_transfer_events` ajoutée en `0.7.48`. |
| `account_create` | comptes système/ATA indirects | `audit-only` indirect | decoded-only | Hors programme CPMM direct. |
| `account_close` | comptes système/ATA indirects | `audit-only` indirect | decoded-only | Hors programme CPMM direct. |
| `wrap_sol` | user/router side | `not_applicable` | `-` | Préparation WSOL hors CPMM. |
| `unwrap_sol` | user/router side | `not_applicable` | `-` | Cleanup WSOL hors CPMM. |
| `order_place` | `-` | `not_applicable` | `-` | CPMM est AMM, pas orderbook. |
| `order_cancel` | `-` | `not_applicable` | `-` | CPMM est AMM, pas orderbook. |
| `order_fill` | `-` | `not_applicable` | `-` | CPMM est AMM, pas orderbook. |
| `consume_events` | `-` | `not_applicable` | `-` | CPMM est AMM, pas orderbook. |
| `settle_funds` | `-` | `not_applicable` | `-` | CPMM est AMM, pas orderbook. |
| `vault_deposit` | `-` | `not_applicable` | `-` | Les vaults CPMM sont des comptes de pool, pas une surface vault séparée. |
| `vault_withdraw` | `-` | `not_applicable` | `-` | Les vaults CPMM sont des comptes de pool, pas une surface vault séparée. |
| `lock` | `-` | `not_applicable` | `-` | Raydium liquidity locking est une surface séparée. |
| `unlock` | `-` | `not_applicable` | `-` | Raydium liquidity locking est une surface séparée. |
| `launch` | `-` | `not_applicable` | `-` | Raydium LaunchLab/Launchpad est séparé de CPMM. |
| `migration` | `-` | `not_applicable` | `-` | Les migrations launch → pool relèvent des launch surfaces. |
| `stake` | `-` | `not_applicable` | `-` | Hors CPMM. |
| `unstake` | `-` | `not_applicable` | `-` | Hors CPMM. |
| `unknown/unmapped audit` | `raydium_cpmm.instruction_audit` | `audit-only` | `k_sol_dex_decoded_events_only` | Toute instruction observée mais non mappée reste audit-only et ne produit jamais trade/candle. |

## Validation attendue

- `k_sol_dex_event_coverage_entries.decoder_code = 'raydium_cpmm'` contient toutes les entrées Carbon/fnzero synchronisées.
- `upstream_git.instruction_match` ne doit plus apparaître pour une instruction CPMM remplacée par un decoder local spécialisé.
- Les familles non-trade CPMM doivent rester `trade_count = 0`.
- Les transactions failed CPMM doivent rester décodées/auditables mais non matérialisées en trade/candle.


## Note `0.7.48-part2-fix2` — CPMM official instruction parity

La couverture `raydium_cpmm` est alignée avec les instructions exposées par le programme officiel Raydium CP-Swap et par Carbon : `create_amm_config`, `update_amm_config`, `update_pool_status`, `collect_protocol_fee`, `collect_fund_fee`, `collect_creator_fee`, `create_permission_pda`, `close_permission_pda`, `initialize`, `initialize_with_permission`, `deposit`, `withdraw`, `swap_base_input`, `swap_base_output`, `lp_change_event` et `swap_event`.

`lp_change_event` est maintenant classé `event_family=liquidity` dans la table coverage, parce que l'event couvre à la fois dépôt et retrait. La matérialisation reste déterminée par `changeType` dans le payload décodé : `0` = add/deposit, `1` = remove/withdraw.


## Note `0.7.48 final` — Raydium CPMM clôturable

Validation finale locale : `deposit` = `11/11` liquidity, `withdraw` = `14/14` liquidity, `lp_change_event` = `25/25` liquidity, fees = `26/26` fee, admin/config observés = `23/23` admin, lifecycle = `9/9`, `swap_event` = audit-only avec `0` trade, et trades matérialisés uniquement depuis `swap_base_input` / `swap_base_output`.

`close_permission_pda` et `update_pool_status` restent `upstream_git_mapped_unverified` faute de corpus local. Les filtres Solscan `instruction=9c5420764587467b` et `instruction=82576c062ee0757b` n'ont pas fourni de signatures exploitables dans l'horizon testé.

## `0.7.49` — `raydium_clmm` final coverage

Sources inventoriées : Carbon `raydium-clmm-decoder`, fnzero `sol-parser-sdk`, Pinax `substreams-solana-idls/src/raydium/clmm`, Raydium/Solscan Program IDL.

État final validé : `45` entrées listées, `33` instructions locales observées/décodées, `25` entrées matérialisées, `1186` trades, `raydium_clmm.instruction_audit = 0`, fallback `upstream_git.instruction_match` localement couvert = `0`.

| Famille | Entrées Raydium CLMM | Statut `0.7.49` | Cible DB | Justification / règle |
|---|---|---|---|---|
| `swap` | `swap`, `swap_v2` | `materialized` | `k_sol_trade_events` | Seuls ces swaps produisent trades/candles lorsque les montants sont exploitables. |
| `swap audit` | `swap_event`, `swap_router_base_in` | `observed/audit` ou `upstream_git_unverified` selon corpus | `k_sol_dex_decoded_events_only` | Pas de double trade/candle. |
| `pool_create` | `create_pool`, `create_customizable_pool` | `decoded`; `create_pool` matérialisé quand prouvé | `k_sol_pool_lifecycle_events` | Création de pool = lifecycle, pas admin. |
| `add_liquidity` | `increase_liquidity`, `increase_liquidity_v2`, open position variants | `decoded`; variantes prouvées matérialisées | `k_sol_liquidity_events` | CLMM implique position/tick/NFT ; matérialisation seulement sur corpus OK. |
| `remove_liquidity` | `decrease_liquidity`, `decrease_liquidity_v2`, close position variants | `decoded`; variantes prouvées matérialisées | `k_sol_liquidity_events` | Aucune promotion trade/candle. |
| `fee` | `collect_fund_fee`, `collect_protocol_fee` | `decoded`; protocol fee matérialisé si tx OK | `k_sol_fee_events` | Mapping fee sans trade/candle. |
| `reward` | `initialize_reward`, `collect_remaining_rewards`, `set_reward_params`, `transfer_reward_owner`, `update_reward_infos` | `decoded`; variantes prouvées matérialisées | `k_sol_reward_events` / `k_sol_pool_admin_events` | Reward/config selon instruction. |
| `admin/config` | `create_amm_config`, `create_dynamic_fee_config`, `create_operation_account`, `update_amm_config`, `update_operation_account`, `update_pool_status` | `decoded`; variantes prouvées matérialisées | `k_sol_pool_admin_events` ou decoded-only | Config/admin sans trade/candle. |
| `account_create` | `create_support_mint_associated` | `observed/decoded` | `k_sol_token_account_events` prévu / decoded-only selon corpus | Side effect technique ; pas de trade/candle. |
| `order_place` | `open_limit_order`, `increase_limit_order` | `decoded/materialized` | `k_sol_orderbook_events` | Orderbook CLMM, jamais trade/candle. |
| `order_cancel` | `decrease_limit_order`, `close_limit_order` | `decoded/materialized` | `k_sol_orderbook_events` | Orderbook CLMM, jamais trade/candle. |
| `settle_funds` | `settle_limit_order` | `decoded/materialized` | `k_sol_orderbook_events` | Settlement orderbook, pas trade direct. |
| `mint/burn/transfer/account_close/wrap/unwrap` | Side effects SPL Token / Token-2022 | `indirect` | decoded-only | Pas de promotion en `raydium_clmm.*` sans instruction directe. |
| `launch/migration/lock/unlock/stake/unstake/vault` | `-` | `not_applicable` | `-` | Surfaces hors CLMM direct. |
| `unknown/unmapped audit` | `raydium_clmm.instruction_audit`, fallback upstream | `closed` | `k_sol_dex_decoded_events_only` | Résidu validé à zéro après replay. |

Les 11 Anchor / `Program data` events restent `upstream_git_unverified` et préparés audit-only faute d’observation locale : `collect_personal_fee_event`, `collect_protocol_fee_event`, `config_change_event`, `create_personal_position_event`, `decrease_liquidity_event`, `increase_liquidity_event`, `liquidity_calculate_event`, `liquidity_change_event`, `pool_created_event`, `swap_event`, `update_reward_infos_event`.

## `0.7.50` — `raydium_launchpad` bootstrap

Sources inventoriées : Carbon `raydium-launchpad-decoder`, Solscan Program IDL `LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj`, fnzero IDL listings, Raydium SDK Launchpad examples. Code local canonique : `raydium_launchpad`. Aucun alias Rust `raydium_launchlab` ne doit être conservé dans l’API publique.

État de départ préparé : `1` entrée programme et `26` entrées discriminées listées depuis Carbon/IDL. Toutes les entrées Launchpad sont gardées `decoded_events_only` en bootstrap, même si leur famille inférée est `swap`, `pool_create`, `fee`, `admin_config`, `launch` ou `migration`. La matérialisation métier est volontairement différée jusqu'au corpus local.

| Famille | Entrées Raydium Launchpad | Statut `0.7.50` bootstrap | Cible DB initiale | Justification / règle |
|---|---|---|---|---|
| `swap` | `buy_exact_in`, `buy_exact_out`, `sell_exact_in`, `sell_exact_out`, `trade_event` | `upstream_git_mapped_unverified` puis `decoded/audit-only` si observé | `k_sol_dex_decoded_events_only` | Aucun trade/candle avant preuve locale de montants, sens et absence de doublon avec la surface DEX de migration. |
| `pool_create` | `initialize`, `initialize_v2`, `initialize_with_token_2022`, `pool_create_event` | `upstream_git_mapped_unverified` | `decoded_events_only` | Lifecycle launch/pool non promu tant que le compte pool/mint/quote n'est pas validé localement. |
| `add_liquidity` | `-` direct confirmé | `not_applicable` | `-` | Peut apparaître via DEX de destination ou SPL side effects, pas comme instruction Launchpad directe prouvée. |
| `remove_liquidity` | `-` direct confirmé | `not_applicable` | `-` | Même règle que `add_liquidity`. |
| `position_open` | `-` | `not_applicable` | `-` | Pas de position CLMM/LP NFT directe confirmée. |
| `position_close` | `-` | `not_applicable` | `-` | Pas de position CLMM/LP NFT directe confirmée. |
| `fee` | `claim_creator_fee`, `claim_platform_fee`, `claim_platform_fee_from_vault`, `claim_vested_event`, `claim_vested_token`, `collect_fee`, `collect_migrate_fee` | `upstream_git_mapped_unverified` puis `decoded/audit-only` si observé | `decoded_events_only` | Fee/vesting/migration fee utile pour stratégie, mais pas matérialisé sans corpus. |
| `reward` | `-` direct confirmé | `not_applicable` | `-` | Vesting n'est pas promu en reward transversal dans cette tranche. |
| `admin/config` | `create_config`, `create_platform_config`, `remove_platform_curve_param`, `update_config`, `update_platform_config`, `update_platform_curve_param` | `upstream_git_mapped_unverified` puis `decoded/audit-only` si observé | `decoded_events_only` | Admin/config utile pour audit, pas de table métier promue. |
| `mint` | SPL Token / Token-2022 side effects possibles | `indirect` | `decoded_events_only` | Ne devient pas `raydium_launchpad.*` sans instruction directe du programme. |
| `burn` | SPL Token / Token-2022 side effects possibles | `indirect` | `decoded_events_only` | Même règle que `mint`. |
| `transfer` | SPL Token / Token-2022 side effects attendus | `indirect` | `decoded_events_only` | Même règle que CPMM/CLMM : side effect transversal. |
| `account_create` | `create_vesting_account`, `create_vesting_event` | `upstream_git_mapped_unverified` | `decoded_events_only` | Vesting/account audit uniquement, pas de nouvelle table transversale. |
| `account_close` | `-` direct confirmé | `not_applicable` | `-` | Aucun close direct Launchpad confirmé. |
| `wrap_sol` | Side effect utilisateur/router possible | `indirect` | `decoded_events_only` | Hors programme Launchpad direct. |
| `unwrap_sol` | Side effect utilisateur/router possible | `indirect` | `decoded_events_only` | Hors programme Launchpad direct. |
| `order_place` | `-` | `not_applicable` | `-` | Launchpad n'est pas traité comme orderbook. |
| `order_cancel` | `-` | `not_applicable` | `-` | Launchpad n'est pas traité comme orderbook. |
| `order_fill` | `-` | `not_applicable` | `-` | Launchpad n'est pas traité comme orderbook. |
| `consume_events` | `-` | `not_applicable` | `-` | Launchpad n'est pas traité comme orderbook. |
| `settle_funds` | `-` | `not_applicable` | `-` | Launchpad n'est pas traité comme orderbook. |
| `vault_deposit` | `-` direct confirmé | `not_applicable` | `-` | Aucun vault direct Launchpad confirmé. |
| `vault_withdraw` | `-` direct confirmé | `not_applicable` | `-` | Aucun vault direct Launchpad confirmé. |
| `lock` | `-` direct confirmé | `not_applicable` | `-` | Liquidity locking reste une autre surface Raydium. |
| `unlock` | `-` direct confirmé | `not_applicable` | `-` | Liquidity locking reste une autre surface Raydium. |
| `launch` | `initialize*`, `pool_create_event` | `upstream_git_mapped_unverified` | `decoded_events_only` | La promotion `k_sol_launch_events` est différée. |
| `migration` | `migrate_to_amm`, `migrate_to_cpswap`, `collect_migrate_fee` | `upstream_git_mapped_unverified` | `decoded_events_only` | Destination AMM/CPMM à valider localement avant liaison métier. |
| `stake` | `-` | `not_applicable` | `-` | Aucun stake direct Launchpad confirmé. |
| `unstake` | `-` | `not_applicable` | `-` | Aucun unstake direct Launchpad confirmé. |
| `unknown/unmapped audit` | `raydium_launchpad.instruction_audit` | `audit-only` | `decoded_events_only` | Résidu à réduire par discriminant après backfill ciblé et replay. |

Rapport détaillé : `docs/reports/RAYDIUM_LAUNCHPAD_EVENT_COVERAGE_REPORT.md`.

SQL de validation : `validation_sql/SQL_VALIDATION_RAYDIUM_LAUNCHPAD_0_7_50.sql`.



### 0.7.50-pre3 Launchpad note

pre3 correction: Launchpad self-CPI selector `e445a52e51cb9a1d` is transport only. Known embedded event discriminators are decoded as `raydium_launchpad.trade_event` and `raydium_launchpad.pool_create_event`. The Launchpad `initialize*` instruction family now supplies pool/pair catalog context; `trade_event` remains decoded-only until trade/candle promotion is explicitly proven.


## Note `0.7.50-pre-r2` — Raydium CPMM/CLMM closure re-check

Sources ajoutées à la vérification CPMM/CLMM : Carbon `raydium-cpmm-decoder`, Carbon `raydium-clmm-decoder`, Solscan Program IDL CPMM/CLMM et `sol-parser-sdk` IDL Raydium.

### CPMM

- `cpi_event` est ajouté à la matrice CPMM avec `event_family=cpi_transport`, `expected_db_target=k_sol_dex_decoded_events_only`, `local_event_kind=raydium_cpmm.cpi_event` et discriminant `e445a52e51cb9a1d`.
- `swap_event` reste `decoded_events_only` pour éviter le double comptage avec `swap_base_input` / `swap_base_output`.
- Le discriminant local `40f4bc78a7e9690a` est codé comme `raydium_cpmm.anchor_idl_instruction`, `event_family=idl_management`, `expected_db_target=k_sol_dex_decoded_events_only`, après inspection Solscan des logs `IdlCreateAccount` / `IdlCloseAccount`.

### CLMM

- `cpi_event` est ajouté à la matrice CLMM avec `event_family=cpi_transport`, `expected_db_target=k_sol_dex_decoded_events_only`, `local_event_kind=raydium_clmm.cpi_event` et discriminant `e445a52e51cb9a1d`.
- `update_dynamic_fee_config` est ajouté avec `event_family=admin_config`, `expected_db_target=k_sol_pool_admin_events`, `local_event_kind=raydium_clmm.update_dynamic_fee_config` et discriminant `0707500802c784f0`.
- Les Program-data events CLMM sont maintenant rattachés localement : `swap_event`, `pool_created_event`, `liquidity_change_event`, `create_personal_position_event`, `decrease_liquidity_event`, `increase_liquidity_event`, `collect_protocol_fee_event`, `config_change_event`, `update_reward_infos_event`.
- `swap_event` et `swap_router_base_in` restent `decoded_events_only` : les trades canoniques sont `swap` / `swap_v2`, afin d'éviter le double comptage et la matérialisation de routes sans pool direct.
- `liquidity_calculate_event` est classé `liquidity_calculation` et reste `decoded_events_only`, car il sert au diagnostic/calcul et non à une mutation de liquidité fiable.
- `create_support_mint_associated` cible la nouvelle table `k_sol_token_account_events`.
- `create_operation_account` et `update_operation_account` sont normalisés en `admin_config`.

Validation attendue après replay : aucune entrée CPMM/CLMM ne doit rester en `event_family='unknown'` hors `program`, les fallbacks `upstream_git.instruction_match` ne doivent pas dupliquer une entrée locale couverte, et les transactions failed ne doivent matérialiser ni trade, ni liquidity, ni fee/admin/reward/orderbook/token-account.

Rapport associé : `docs/reports/RAYDIUM_CPMM_CLMM_RECHECK_REPORT_0_7_50_PRE_R2.md`.

## `0.7.51` — `raydium_amm_v4`

Sources inventoriées : Carbon `raydium-amm-v4-decoder`, Pinax `src/raydium/amm`, fnzero `raydium_amm_v4.json`, Solscan Program IDL. `raydium_pool_v4` est comparé mais non promu.

Validation locale finale : tous les discriminants AMM v4 officiels `00..11` sont observés ; `instruction_audit`, fallback upstream, decoded sans coverage, observations 8 octets, non-swap trade, failed tx trade, gaps inexpliqués et multi-target materialization sont vides.

| Famille | Entrées AMM v4 | Statut `0.7.51-final` | Cible DB | Règle |
|---|---|---|---|---|
| `swap` | `swap_base_in`, `swap_base_out`, `swap_base_in_v2`, `swap_base_out_v2` | observed/materialized partiel expliqué | `k_sol_trade_events` | Trade/candle seulement si tx successful + montants vault fiables ; sinon `skipTradeReason`. |
| `pool_create` | `initialize`, `initialize2_pool` | observed/materialized | `k_sol_pool_lifecycle_events` | Alimente lifecycle et catalogue seulement quand les mints/pool sont prouvés. |
| `pool_create` deprecated | `pre_initialize` | observed/materialized audit minimal | `k_sol_pool_lifecycle_events` | Lifecycle deprecated/partial ; ne crée pas de pair exploitable sans mints. |
| `liquidity_add` | `deposit` | observed/materialized partiel expliqué | `k_sol_liquidity_events` | Jamais trade/candle ; pools absents du catalogue restent decoded-only expliqués. |
| `liquidity_remove` | `withdraw` | observed/materialized partiel expliqué | `k_sol_liquidity_events` | Jamais trade/candle ; deltas/catalogue manquants doivent être explicités. |
| `fee` | `withdraw_pnl`, `withdraw_srm` | observed/materialized partiel expliqué | `k_sol_fee_events` | Jamais trade/candle. |
| `admin/config` | `set_params`, `create_config_account`, `update_config_account` | observed/materialized | `k_sol_pool_admin_events` | Preuve métier par corpus uniquement. |
| `orderbook side effects` | `monitor_step`, `migrate_to_open_book`, `admin_cancel_orders` | observed/materialized | `k_sol_orderbook_events` | Side effects OpenBook/Serum ; pas de trade OpenBook autonome, pas de lifecycle en double. |
| `cpi/informational` | `simulate_info` | observed decoded-only | `k_sol_dex_decoded_events_only` | Audit technique uniquement. |
| `token side effects` | SPL Token / Token-2022 inner instructions | transversal | decoded-only actuellement | Ne pas promouvoir comme AMM v4 direct. |
| `unknown/unmapped audit` | residual `raydium_amm_v4.instruction_audit` | vide | decoded-only si futur inconnu | Tout residual doit être expliqué avant promotion. |

## 0.7.52 — `raydium_stable_swap`

Status: **closed on local corpus**.

| entry | discriminator | family | expected target | local event kind | status |
|---|---:|---|---|---|---|
| `initialize` | `00` | `pool_create` | `k_sol_pool_lifecycle_events` | `raydium_stable_swap.initialize` | observed/materialized when context complete |
| `init_model_data` | `01` | `model_setup` | decoded-only | `raydium_stable_swap.init_model_data` | observed decoded-only / explained |
| `update_model_data` | `02` | `admin_config` | `k_sol_pool_admin_events` | `raydium_stable_swap.update_model_data` | observed/materialized |
| `deposit` | `03` | `liquidity_add` | `k_sol_liquidity_events` | `raydium_stable_swap.deposit` | observed/materialized |
| `withdraw` | `04` | `liquidity_remove` | `k_sol_liquidity_events` | `raydium_stable_swap.withdraw` | observed/materialized |
| `monitor_step` | `05` | `order_place` | `k_sol_orderbook_events` | `raydium_stable_swap.monitor_step` | observed/materialized |
| `set_params` | `06` | `admin_config` | `k_sol_pool_admin_events` | `raydium_stable_swap.set_params` | observed/materialized |
| `withdraw_pnl` | `07` | `fee` | `k_sol_fee_events` | `raydium_stable_swap.withdraw_pnl` | observed/materialized |
| `withdraw_srm` | `08` | `fee` | `k_sol_fee_events` | `raydium_stable_swap.withdraw_srm` | observed/materialized when context complete |
| `swap_base_in` | `09` | `swap` | `k_sol_trade_events` from vault deltas only | `raydium_stable_swap.swap_base_in` | success/vault-delta materialized; failed decoded-only |
| `pre_initialize` | `0a` | `pool_create` | lifecycle or decoded-only | `raydium_stable_swap.pre_initialize` | observed decoded-only / explained in current corpus |
| `swap_base_out` | `0b` | `swap` | `k_sol_trade_events` from vault deltas only | `raydium_stable_swap.swap_base_out` | success/vault-delta materialized; failed decoded-only |
| `simulate_info` | `0c` | `cpi_transport` | decoded-only | `raydium_stable_swap.simulate_info` | observed decoded-only / explained |
| `admin_cancel_orders` | `0d` | `orderbook_admin` | `k_sol_orderbook_events` | `raydium_stable_swap.admin_cancel_orders` | observed/materialized when context complete |
| `swap_event` | `40c6cde8260871e2` | `cpi_transport` | decoded-only | `raydium_stable_swap.swap_event` | upstream mapped; not observed locally |

Stable Swap swaps are not materialized from instruction min/max bounds. `swap_base_in/out` require `amountSource=stable_swap_vault_balance_delta`; `stable_swap_instruction_bounds_only` remains decoded-only and, in the final corpus, appears only on failed transactions.


## 0.7.54 — `pump_fun` closed

Program id unique : `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P`.

Source locale prioritaire : `idls/pump_fun.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json`.

Replay final rapporté : `1679 replayed`, `89 trades`, `10 lifecycle`, `348 candle upserts`, catalogue `52 tokens / 50 pools / 50 pairs`.

| Entry / groupe | Discriminator | Family | Expected DB target | Local event kind cible | Status final |
|---|---:|---|---|---|---|
| `create` / `create_v2` / `create_event` | `181ec828051c0777` / `d6904cec5f8b31b4` / `1b72a94ddeeb6376` | `launch` | `k_sol_launch_events` ou decoded-only | `pump_fun.create*` | couvert ; launch matérialisé quand mint/bonding/creator sont fiables |
| `migrate` / `migrate_v2` / migration events | `9beae792ec9ea21e` / `bbcb121fceedfe29` / voir IDL | `migration` | `k_sol_launch_events` ou decoded-only | `pump_fun.migrate*` | couvert ; migration matérialisée quand contexte fiable |
| `buy` / `sell` | `66063d1201daebea` / `33e685a4017f83ad` | `swap` | `k_sol_trade_events` | `pump_fun.buy` / `pump_fun.sell` | matérialisés directement avec montants fiables : `17` buy, `25` sell |
| `buy_exact_sol_in` | `38fc74089edfcd5f` | `swap` | `k_sol_trade_events` | `pump_fun.buy_exact_sol_in` | matérialisé directement ; `15` trades, y compris logs `Program data` tronqués exploitables |
| `buy_v2` / `sell_v2` / `buy_exact_quote_in_v2` | `b817ee6167c5d33d` / `5df6823ce7e940b2` / `c2ab1c46684d5b2f` | `swap` | audit/routing + `trade_event` canonique | `pump_fun.*_v2` | decoded/covered, non matérialisés directement ; les montants exécutés sont matérialisés via `pump_fun.trade_event` |
| `trade_event` | `bddb7fd34ee661ee` | `swap` | `k_sol_trade_events` | `pump_fun.trade_event` | `72` decoded / `25` trades ; source canonique des v2/exact quand corrélée ; skip explicite si couvert par trade direct |
| `collect_creator_fee*` / `distribute_creator_fees*` | voir IDL | `fee` | `k_sol_fee_events` ou decoded-only | `pump_fun.collect_creator_fee*`, `pump_fun.distribute_creator_fees*` | couvert ; matérialisation fee seulement avec montant/acteur fiables |
| `claim_cashback*` / `claim_token_incentives` / volume accumulators | voir IDL | `reward` | `k_sol_reward_events` ou decoded-only | `pump_fun.claim_*`, volume accumulator events | couvert ; rewards matérialisées seulement si preuve suffisante |
| creator/admin/config group | voir IDL | `admin_config` | `k_sol_pool_admin_events` ou decoded-only | `pump_fun.admin_*`, `pump_fun.set_*`, `pump_fun.toggle_*`, quote/buyback/reserve entries | couvert ; promotion seulement si action/comptes exploitables |

### Invariants de fermeture `0.7.54`

- Aucun `pump_fun` local decoded event sans coverage.
- Aucun fallback `upstream_git` résiduel pour les entrées Pump.fun couvertes localement.
- Aucun business event matérialisé depuis transaction failed.
- Aucun non-swap Pump.fun matérialisé en trade/candle.
- Aucun double-count entre instruction trade directe et `trade_event` Anchor.
- Aucun trade candidate Pump.fun réussi sans matérialisation ni skip reason.
- Les entrées IDL-only sont couvertes localement ; les non observées restent `mapped_unverified` ou audit-only, pas des gaps bloquants.

## 0.7.53 — `pump_swap`

Program id unique : `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA`.

| Entry | Discriminator | Family | Expected DB target | Local event kind | Status |
|---|---:|---|---|---|---|
| `buy` | `66063d1201daebea` | `swap` | `k_sol_trade_events` | `pump_swap.buy` | local specialized decoder ; materialize only from exact transfer/vault deltas |
| `sell` | `33e685a4017f83ad` | `swap` | `k_sol_trade_events` | `pump_swap.sell` | local specialized decoder ; materialize only from exact transfer/vault deltas |
| `buy_exact_quote_in` | `c62e1552b4d9e870` | `swap` | `k_sol_trade_events` only when exact Anchor `BuyEvent` is present ; otherwise decoded-only | `pump_swap.buy_exact_quote_in` | local specialized decoder ; `amountSource=pump_swap_anchor_buy_event` materializes trades ; `instruction_bounds_only` rows keep explicit `skipTradeReason` |
| `create_pool` | `e992d18ecf6840bc` | `pool_create` | `k_sol_pool_lifecycle_events` or decoded-only | `pump_swap.create_pool` | local specialized instruction ; non-trade |
| `deposit` | `f223c68952e1f2b6` | `liquidity_add` | `k_sol_liquidity_events` or decoded-only | `pump_swap.deposit` | local specialized instruction ; non-trade |
| `withdraw` | `b712469c946da122` | `liquidity_remove` | `k_sol_liquidity_events` or decoded-only | `pump_swap.withdraw` | local specialized instruction ; non-trade |
| `collect_coin_creator_fee` | `a039592ab58b2b42` | `fee` | `k_sol_fee_events` or decoded-only | `pump_swap.collect_coin_creator_fee` | local specialized instruction ; non-trade |
| `transfer_creator_fees_to_pump` | `8b348655e4e56cf1` | `fee` | `k_sol_fee_events` or decoded-only | `pump_swap.transfer_creator_fees_to_pump` | local specialized instruction ; non-trade |
| `transfer_creator_fees_to_pump_v2` | `01214eb921432c5c` | `fee` | `k_sol_fee_events` or decoded-only | `pump_swap.transfer_creator_fees_to_pump_v2` | Solscan IDL proof + local log proof: `transfer_creator_fees_to_pump_v2` / `Instruction: TransferCreatorFeesToPumpV2` ; non-trade |
| `claim_cashback` | `253a237ebe35e4c5` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.claim_cashback` | local specialized instruction ; non-trade |
| `claim_token_incentives` | `1004471ccc01281b` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.claim_token_incentives` | local specialized instruction ; non-trade |
| `init_user_volume_accumulator` | `5e06ca73ff60e8b7` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.init_user_volume_accumulator` | local specialized instruction ; non-trade |
| `sync_user_volume_accumulator` | `561fc057a3574fee` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.sync_user_volume_accumulator` | local specialized instruction ; non-trade |
| `close_user_volume_accumulator` | `f945a4da9667548a` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.close_user_volume_accumulator` | local specialized instruction ; non-trade |
| `update_buyback_config` | `fbe0ab92a01a71e9` | `admin_config` | `k_sol_pool_admin_events` or decoded-only | `pump_swap.update_buyback_config` | Solscan IDL proof + local log proof: `update_buyback_config` / `Instruction: UpdateBuybackConfig` ; non-trade |
| `set_reserved_fee_recipient` | `cfbdb247a77a44b4` | `admin_config` | `k_sol_pool_admin_events` or decoded-only | `pump_swap.set_reserved_fee_recipient` | local log proof only: `Instruction: SetReservedFeeRecipient` ; absent from checked Solscan IDL raw ; non-trade |
| admin/config group | see report | `admin_config` | `k_sol_pool_admin_events` or decoded-only | `pump_swap.*` | local specialized instruction ; non-trade ; includes `toggle_cashback_enabled` and `migrate_pool_coin_creator` as admin-only |
| `buy_event` / `sell_event` | `67f4521f2cf57777` / `3e2f370aa503dc2a` | `swap_event_audit` | decoded-only | not local-instruction mapped | Program-data event discriminators listed; not used to duplicate local instruction trades |
| auxiliary Program-data events | see report | fee/reward/admin/liquidity | decoded-only until payload-specific materializer exists | not local-instruction mapped | explicit upstream status required after replay |



### Fermeture `0.7.53`

- `pump_swap` ne présente plus de decoded event local sans coverage dans le corpus de clôture.
- `buy_exact_quote_in` est matérialisé seulement quand le `BuyEvent` Anchor donne les montants exacts ; les bornes d’instruction seules restent non actionnables.
- Les events Anchor `*_event` sont décodés en audit-only pour éviter les doublons, sauf exception matérialisable explicitement testée.
- Les gaps globaux Pump.fun/PumpSwap/Pump Fees sont fermés ; la watchlist résiduelle courante ne contient plus `pump_fees` et garde seulement `jupiter_swap.route_v2` comme observation ponctuelle.
- Les checks Raydium AMM v4 / CLMM / CPMM normalisés sont vides ; aucune correction Raydium n’est incluse dans cette clôture.

## 0.7.55 — Pump Fees

| Entry group | Discriminants | Famille | Target attendu | Local event kind | Notes |
|---|---:|---|---|---|---|
| `get_fees` | `e7257e55cf5b3f34` | audit | decoded-only | `pump_fees.get_fees` | Calcul/preview de fees ; ne pas matérialiser comme fee payé sans transfert réalisé. |
| social fee claim/create | IDL locale | reward / lifecycle | `k_sol_reward_events` ou `k_sol_pool_lifecycle_events` | `pump_fees.claim_social_fee_pda*`, `pump_fees.social_fee_pda_*` | Claim matérialisable seulement avec montant/acteur/mint fiables et transaction OK. |
| donation fee PDA | IDL locale | fee / lifecycle | `k_sol_fee_events` ou `k_sol_pool_lifecycle_events` | `pump_fees.*donation_fee_pda*` | Crank avec montant fiable vers fee ; création de PDA vers lifecycle. |
| buyback | IDL locale | fee / admin/lifecycle | `k_sol_fee_events`, `k_sol_pool_admin_events` ou lifecycle | `pump_fees.*buyback*` | Sweep matérialisable comme fee si montant fiable ; init/update comme lifecycle/admin. |
| fee sharing/config/authority/tier | IDL locale + Carbon partiel | admin_config / lifecycle | `k_sol_pool_admin_events` ou `k_sol_pool_lifecycle_events` | `pump_fees.*config*`, `pump_fees.*authority*`, `pump_fees.*tier*`, `pump_fees.update_fee_shares*` | Aucun trade/candle ; decoded-only/audit-only si données métier insuffisantes. |

## 0.7.55 Pump Fees — clôture

Programme : `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ`. Source locale prioritaire : `idls/pump_fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json`.

| Famille | Entrées | Target | Statut | Notes |
|---|---|---|---|---|
| fee calculation | `get_fees` / `e7257e55cf5b3f34` | `k_sol_dex_decoded_events_only` | decoded-only validé | Calcul/preview ; ne représente pas une fee payée. |
| reward/social fee | `claim_social_fee_pda`, `claim_social_fee_pda_v2`, `social_fee_pda_claimed` | `k_sol_reward_events` | matérialisé si tx OK | Écarts expliqués par failed tx. |
| donation fee | `create_donation_fee_pda`, `crank_donation_fee_pda`, events associés | lifecycle / `k_sol_fee_events` | matérialisé si tx OK | Création PDA vers lifecycle ; crank vers fee. |
| buyback | `initialize_buyback`, `sweep_buyback`, authority/rate-limit | lifecycle / fee / admin | matérialisé si tx OK | `sweep_buyback` et `sweep_buyback_event` alimentent fee. |
| fee sharing/config/authority/tier | config/reset/transfer/revoke/update/upsert | `k_sol_pool_admin_events` ou lifecycle | matérialisé si tx OK | Aucun trade/candle ; failed tx audit-only. |
| Anchor IDL non observés | `SetAuthorityEvent`, `SetClaimRateLimitEvent`, `SetDisableFlagsEvent`, `SetSocialClaimAuthorityEvent` | admin/audit | tests synthétiques | Aucun corpus Solscan au moment de clôture ; decoder conservé pour transactions futures. |
| Solscan hors IDL locale | `revoke_fee_sharing_authority_event`, `transfer_fee_sharing_authority_event` | admin | mapped_unverified | Discriminators trouvés via Solscan ; conservés comme surfaces futures. |

Invariants propres : fallback `pump_fees` vide, decoded sans coverage vide, successful non-materialized sans skip/policy vide, failed tx matérialisée vide, multi-target vide, anti-trade/candle direct vide, watchlist globale sans `pump_fees`.



## 0.7.56 — Meteora DBC clôturé

Programme : `dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN`. Source locale prioritaire : `idls/meteora_dbc.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json`.

| Groupe | Entrées | Famille | Cible DB | Local event kind | Décision finale |
|---|---|---|---|---|---|
| swaps | `swap`, `swap2` | swap | `k_sol_trade_events` + candles | `meteora_dbc.swap`, `meteora_dbc.swap2` | Matérialisés seulement avec montants et mints base/quote fiables ; `swap2` validé via transferts CPI/amount inference. |
| virtual pool init | `initialize_virtual_pool_with_spl_token`, `initialize_virtual_pool_with_token2022`, `EvtInitializePool` | pool_create | `k_sol_pool_lifecycle_events` + catalog si contexte complet | `meteora_dbc.initialize_virtual_pool_with_*`, `meteora_dbc.evt_initialize_pool_event` | Lifecycle/catalog prudent ; failed tx audit-only. |
| migration / lockers | `migrate_meteora_damm*`, `migration_damm_v2*`, `create_locker`, `EvtCurveComplete` | migration / lifecycle | `k_sol_pool_lifecycle_events` | `meteora_dbc.migrate_*`, `meteora_dbc.migration_*`, `meteora_dbc.create_locker` | Lifecycle, pas liquidity artificielle pour LP claim/lock ; metadata-only decoded-only si contexte insuffisant. |
| fees/surplus/leftover | `claim_*fee*`, `withdraw_migration_fee`, `zap_protocol_fee`, `*_withdraw_surplus`, `withdraw_leftover`, events Anchor fee | fee | `k_sol_fee_events` + `k_sol_fee_event_amounts` | `meteora_dbc.*fee*`, `meteora_dbc.*surplus*`, `meteora_dbc.*leftover*` | Montants réels depuis CPI SPL ou lamport delta ; maxima d'instruction refusés ; multi-leg/multi-mint dans `k_sol_fee_event_amounts`. |
| admin/config/metadata/operator | `create_config`, `create_operator_account`, `close_*operator*`, metadata, `transfer_pool_creator`, config events | admin_config | `k_sol_pool_admin_events` ou decoded-only | `meteora_dbc.*config*`, `meteora_dbc.*operator*`, `meteora_dbc.*metadata*`, `meteora_dbc.transfer_pool_creator` | Admin si compte/acteur fiables ; payload metadata générique decoded-only avec raison. |
| Anchor swap events | `EvtSwap`, `EvtSwap2` | swap/audit | decoded-only sauf corrélation sûre | `meteora_dbc.evt_swap_event`, `meteora_dbc.evt_swap2_event` | Les events portent des montants mais pas toujours le contexte mint/pair ; pas de double-count avec l'instruction swap matérialisée. |

Validation finale DBC : `89` parents fee, `96` legs fee amount, aucun parent scalaire sans leg, aucun leg orphelin, aucun decoded event local sans coverage, aucun failed tx matérialisé, aucun multi-target, aucun non-swap vers trade/candle.

## `0.7.57` — `meteora_dlmm` final coverage

Programme : `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo`. Source locale : `idls/meteora_dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json`. Surface finale : `76` instructions IDL, `30` events Anchor, `12` accounts, plus correction locale `initialize_preset_parameter_v2` (`75c73e67068e1fcb`) observée dans le corpus.

Validation finale : `460` tests, clippy OK, `769` replayed, `106` trades, `664` liquidity, `1107` lifecycle, `424` candle upserts, `8062` instruction observations. Les checks decoded sans coverage, successful non-materialized, failed tx materialized, multi-target, non-swap trade/candle, fee scalar sans leg, orphan fee legs et coverage duplicates sont vides.

| Famille | Entrées DLMM | Statut `0.7.57` | Cible DB | Justification / règle |
|---|---|---|---|---|
| `swap` | `swap`, `swap2`, `swap_exact_out`, `swap_exact_out2`, `swap_with_price_impact`, `swap_with_price_impact2` | `materialized` | `k_sol_trade_events` + candles | Seules ces instructions produisent trade/candle direct quand montants/mints/pool sont fiables. |
| `swap_log` | `swap_event`, `swap2_evt` | `materialized` | `k_sol_pool_lifecycle_events` | Logs Anchor informatifs matérialisés sans double-count trade/candle. |
| `pool_create` | `create_pool`, `lb_pair_create_event`, `initialize_*_lb_pair*`, `initialize_permission_lb_pair` | `materialized` si observé, sinon `upstream_git_mapped_unverified` | `k_sol_pool_lifecycle_events` | Pool lifecycle ; pas de trade direct. |
| `liquidity_add` | `add_liquidity*`, `add_liquidity_event` | `materialized` | `k_sol_liquidity_events` | Montants/side effects liquidity ; aucun trade/candle. |
| `liquidity_remove` | `remove_liquidity*`, `remove_all_liquidity`, `remove_liquidity_event` | `materialized` | `k_sol_liquidity_events` | Retrait liquidity ; failed tx audit-only. |
| `liquidity_change` | `rebalance_liquidity`, `rebalancing_event` | `materialized` | `k_sol_liquidity_events` | Changement de liquidité/bin ; pas de trade. |
| `position_open` | `initialize_position*`, `position_create_event` | `materialized` | `k_sol_pool_lifecycle_events` | Position/bin lifecycle, pas liquidity artificielle quand l'opération est structurelle. |
| `position_close` | `close_position*`, `position_close_event` | `materialized` | `k_sol_pool_lifecycle_events` | Fermeture position lifecycle. |
| `position_update` | `increase_position_length*`, `decrease_position_length*`, `update_position_operator*`, position update events | `materialized` si observé | `k_sol_pool_lifecycle_events` | Mise à jour de position ; pas admin générique. |
| `bin/oracle lifecycle` | `initialize_bin_array*`, `close_bin_array`, `go_to_a_bin*`, `increase_oracle_length`, `migrate_bin_array` | `materialized` si observé | `k_sol_pool_lifecycle_events` | `close_bin_array` a `16/14` car `2` failed tx `Custom 6015`, comportement attendu. |
| `fee` | `claim_fee*`, `claim_fee*_event`, `composition_fee_event`, `withdraw_protocol_fee`, `zap_protocol_fee` | `materialized` | `k_sol_fee_events` + `k_sol_fee_event_amounts` | Recovery inner SPL transfer strictement allowlistée ; legs multi-mint conservés sans agrégation artificielle. |
| `reward` | `claim_reward*`, `claim_reward*_event`, `fund_reward*`, `initialize_reward*`, `withdraw_ineligible_reward*` | `materialized` si observé | `k_sol_reward_events` | Claims/funding avec amounts récupérés quand transfert réel ; `initialize_reward*` sans amount est normal. |
| `admin/config` | `update_base_fee_parameters`, `fee_parameter_update_event`, `set_pair_status*`, `set_activation_point`, `set_pre_activation*`, preset/token badge/operator/config, `initialize_preset_parameter_v2` | `materialized` si observé | `k_sol_pool_admin_events` | Admin/config non financier ; pas trade/candle. |
| `orderbook` | `place_limit_order*`, `cancel_limit_order*`, `close_limit_order*` | `materialized` | `k_sol_orderbook_events` | Limit/orderbook events sans trade/candle. |
| `account metadata` | `lb_pair`, `bin_array`, `position_v2`, `oracle`, `operator`, `token_badge`, etc. | `upstream_git_mapped_unverified` / non observé | `k_sol_dex_decoded_events_only` | Accounts IDL listés pour coverage, pas de matérialisation métier directe. |
| `instruction_audit` | résidu inconnu | `closed` | `k_sol_pool_admin_events` seulement si observé | Résidu final observé = `0`; `75c73e67068e1fcb` a été promu en `initialize_preset_parameter_v2`. |

