Security review · October 2026
Solana Console: Console OFT and OApp V2 for LayerZero
Guardian's review of Solana Console: Console OFT and OApp V2 for LayerZero, published October 2026. The report records 18 findings across 2 review rounds, including 1 medium and 5 low.
See how Guardian runs a cross-chain bridge audit.
- Published
- Review window
- September 29 to October 13, 2026
- Rounds
- Main Review, Remediation Review 1
- Language
- Rust
- Sector
- Cross-chain
- 0 Critical
- 0 High
- 1 Medium
- 5 Low
- 12 Informational
Scope
-
GuardianOrg/mirror-layerzero-labs-audit-external
fc4a9343644d6e6826f78811f4f61b05f892f6
192 files in scope · 6,453 nSLOC
| File | nSLOC | Lines |
|---|---|---|
apps/oft-app/contracts/solana/oft/src/events.rs | 0 | 36 |
apps/project-types/console-oft-app/contracts/solana/Cargo.toml | 38 | 57 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/Cargo.toml | 28 | 62 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/codec/compose_msg.rs | 21 | 104 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/codec/mod.rs | 0 | 2 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/codec/msg.rs | 20 | 107 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/console_oft_info.rs | 1 | 48 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/errors.rs | 70 | 131 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/events.rs | 35 | 150 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/credit_redirect.rs | 21 | 27 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/mod.rs | 11 | 64 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/pubkey_policy.rs | 34 | 44 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/receive_accounts.rs | 68 | 97 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/token2022.rs | 100 | 140 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/transfer_hook_accounts.rs | 81 | 100 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/transfer_hook_plan.rs | 60 | 87 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_config/fee_config_view.rs | 17 | 154 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_config/mod.rs | 0 | 10 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_config/set_default_fee_bps.rs | 0 | 24 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_config/set_fee_bps.rs | 0 | 60 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_handler/mod.rs | 0 | 3 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_handler/set_fee_deposit.rs | 2 | 36 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/init_console_oft_info.rs | 0 | 33 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/init_console_oft.rs | 14 | 135 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive_types_info.rs | 39 | 71 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive_types_v3.rs | 285 | 347 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive.rs | 134 | 423 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/mod.rs | 10 | 37 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/oft_store_view.rs | 0 | 47 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/pause/mod.rs | 0 | 7 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/pause/pause_config_view.rs | 0 | 37 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/pause/set_default_paused.rs | 0 | 37 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/pause/set_paused.rs | 0 | 76 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/quote_oft.rs | 0 | 97 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/quote_send.rs | 1 | 80 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/checkpoint_rate_limit.rs | 3 | 69 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/get_rate_limit_usages.rs | 0 | 45 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/is_rate_limit_address_exempt.rs | 0 | 25 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/mod.rs | 0 | 17 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/rate_limits.rs | 0 | 30 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/set_rate_limit_address_exemption.rs | 0 | 69 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/set_rate_limit_config.rs | 0 | 59 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/set_rate_limit_global_config.rs | 0 | 40 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/set_rate_limit_state.rs | 0 | 69 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/send.rs | 158 | 485 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/set_credit_redirect_config.rs | 36 | 49 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/set_pubkey_policy.rs | 22 | 37 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/set_token_manager.rs | 19 | 30 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/sync_acl_gating_program.rs | 29 | 40 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/sync_transfer_hook_program.rs | 9 | 41 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/lib.rs | 29 | 263 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/seeds.rs | 0 | 5 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/state/mod.rs | 10 | 130 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/state/oft.rs | 10 | 93 |
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/state/rate_limit.rs | 171 | 703 |
apps/project-types/oapp-app/contracts/solana/Cargo.toml | 9 | 30 |
apps/project-types/oapp-app/contracts/solana/macros/Cargo.toml | 1 | 23 |
apps/project-types/oapp-app/contracts/solana/macros/src/composer.rs | 2 | 41 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/composer/lz_compose_types_info.rs | 1 | 29 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/composer/lz_compose_types_v3.rs | 11 | 18 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/composer/lz_compose.rs | 0 | 17 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/composer/mod.rs | 2 | 23 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/mod.rs | 0 | 4 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/accept_default_admin_transfer.rs | 0 | 50 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/burn.rs | 59 | 69 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/clear.rs | 60 | 70 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/get_enforced_options.rs | 0 | 57 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/get_peer.rs | 0 | 55 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/init_enforced_options.rs | 0 | 87 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/is_compose_msg_sender.rs | 0 | 44 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/lz_receive_types_info.rs | 1 | 26 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/lz_receive_types_v3.rs | 11 | 17 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/lz_receive.rs | 0 | 33 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/mod.rs | 10 | 49 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/next_nonce.rs | 0 | 52 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/nilify.rs | 59 | 69 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/set_enforced_options.rs | 0 | 101 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/set_peer.rs | 0 | 74 |
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/skip.rs | 58 | 68 |
apps/project-types/oapp-app/contracts/solana/macros/src/lib.rs | 0 | 81 |
apps/project-types/oapp-app/contracts/solana/macros/src/oapp.rs | 5 | 80 |
apps/project-types/oapp-app/contracts/solana/macros/src/state_types.rs | 0 | 79 |
apps/project-types/oapp-app/contracts/solana/src/common.rs | 4 | 74 |
apps/project-types/oapp-app/contracts/solana/src/endpoint_cpi.rs | 84 | 528 |
apps/project-types/oapp-app/contracts/solana/src/errors.rs | 3 | 17 |
apps/project-types/oapp-app/contracts/solana/src/events.rs | 0 | 26 |
apps/project-types/oapp-app/contracts/solana/src/lib.rs | 7 | 96 |
apps/project-types/oapp-app/contracts/solana/src/lz_compose_types_v3.rs | 47 | 72 |
apps/project-types/oapp-app/contracts/solana/src/lz_plan.rs | 42 | 71 |
apps/project-types/oapp-app/contracts/solana/src/lz_receive_types_v3.rs | 90 | 120 |
apps/project-types/oapp-app/contracts/solana/src/oapp_info.rs | 1 | 278 |
apps/project-types/oapp-app/contracts/solana/src/options.rs | 5 | 137 |
apps/project-types/oapp-app/contracts/solana/src/types.rs | 28 | 158 |
apps/project-types/oapp-app/contracts/solana/src/utils.rs | 0 | 14 |
apps/token-app/contracts/solana/pubkey-policy-hook/Cargo.toml | 18 | 21 |
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/Cargo.toml | 32 | 36 |
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/errors.rs | 8 | 8 |
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/events.rs | 7 | 8 |
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/instructions/init_transfer_hook.rs | 73 | 97 |
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/instructions/mod.rs | 4 | 5 |
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/instructions/transfer_hook.rs | 49 | 85 |
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/lib.rs | 23 | 33 |
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/state.rs | 44 | 51 |
apps/token-app/contracts/solana/token-manager/Cargo.toml | 45 | 48 |
apps/token-app/contracts/solana/token-manager/interface/Cargo.toml | 19 | 21 |
apps/token-app/contracts/solana/token-manager/interface/src/acl/manifest.rs | 233 | 283 |
apps/token-app/contracts/solana/token-manager/interface/src/acl/mod.rs | 20 | 36 |
apps/token-app/contracts/solana/token-manager/interface/src/acl/thaw.rs | 138 | 171 |
apps/token-app/contracts/solana/token-manager/interface/src/burn.rs | 34 | 47 |
apps/token-app/contracts/solana/token-manager/interface/src/lib.rs | 10 | 16 |
apps/token-app/contracts/solana/token-manager/interface/src/seeds.rs | 24 | 30 |
apps/token-app/contracts/solana/token-manager/interface/src/state.rs | 42 | 58 |
apps/token-app/contracts/solana/token-manager/interface/src/version.rs | 13 | 21 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/Cargo.toml | 37 | 41 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/authority.rs | 36 | 46 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/errors.rs | 22 | 22 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/events.rs | 70 | 80 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/freeze_token_account.rs | 47 | 65 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/gate.rs | 45 | 88 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/helpers.rs | 77 | 88 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/init_acl.rs | 60 | 86 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/manage_acl.rs | 78 | 96 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/mod.rs | 11 | 12 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/thaw_token_account.rs | 47 | 65 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/get_version.rs | 5 | 8 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/mod.rs | 12 | 13 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/native_authority/mod.rs | 2 | 3 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/native_authority/set_native_authority.rs | 91 | 111 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/mod.rs | 4 | 5 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/pd_burn.rs | 92 | 114 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/pd_recover.rs | 109 | 150 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permissioned_burn/burn.rs | 97 | 123 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permissioned_burn/mod.rs | 2 | 3 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/root/init_token_manager.rs | 87 | 113 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/root/mod.rs | 4 | 5 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/root/rbac_default_admin.rs | 53 | 69 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/lib.rs | 87 | 133 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/state.rs | 1 | 3 |
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/types.rs | 27 | 36 |
contracts/common/framework/solana/anchor-trait/Cargo.toml | 33 | 39 |
contracts/common/framework/solana/anchor-trait/src/assembly.rs | 58 | 105 |
contracts/common/framework/solana/anchor-trait/src/generation.rs | 130 | 205 |
contracts/common/framework/solana/anchor-trait/src/lib.rs | 53 | 134 |
contracts/common/framework/solana/anchor-trait/src/overrides.rs | 168 | 271 |
contracts/common/utils/solana/heap-allocator/Cargo.toml | 5 | 6 |
contracts/common/utils/solana/heap-allocator/lib/Cargo.toml | 10 | 12 |
contracts/common/utils/solana/heap-allocator/lib/src/lib.rs | 53 | 95 |
contracts/common/utils/solana/program-id/Cargo.toml | 5 | 6 |
contracts/common/utils/solana/program-id/lib/Cargo.toml | 13 | 16 |
contracts/common/utils/solana/program-id/lib/src/lib.rs | 30 | 57 |
contracts/common/utils/solana/pubkey-policy/Cargo.toml | 21 | 24 |
contracts/common/utils/solana/pubkey-policy/interface/Cargo.toml | 14 | 17 |
contracts/common/utils/solana/pubkey-policy/interface/src/error.rs | 20 | 31 |
contracts/common/utils/solana/pubkey-policy/interface/src/lib.rs | 12 | 19 |
contracts/common/utils/solana/pubkey-policy/interface/src/pubkey_policy.rs | 209 | 257 |
contracts/common/utils/solana/pubkey-policy/interface/src/seeds.rs | 13 | 20 |
contracts/common/utils/solana/pubkey-policy/interface/src/state.rs | 53 | 69 |
contracts/common/utils/solana/pubkey-policy/interface/src/version.rs | 13 | 21 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/Cargo.toml | 28 | 32 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/errors.rs | 8 | 11 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/events.rs | 24 | 27 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/get_version.rs | 5 | 8 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/init_pubkey_policy.rs | 45 | 56 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/membership.rs | 15 | 23 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/mod.rs | 11 | 12 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/set_blacklisted.rs | 48 | 56 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/set_mode.rs | 24 | 28 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/set_whitelisted.rs | 48 | 56 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/lib.rs | 41 | 58 |
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/types.rs | 24 | 29 |
contracts/common/utils/solana/rbac/Cargo.toml | 30 | 37 |
contracts/common/utils/solana/rbac/macros/Cargo.toml | 14 | 16 |
contracts/common/utils/solana/rbac/macros/src/init_default_admin.rs | 45 | 73 |
contracts/common/utils/solana/rbac/macros/src/instructions/accept_default_admin_transfer.rs | 97 | 114 |
contracts/common/utils/solana/rbac/macros/src/instructions/begin_default_admin_transfer.rs | 52 | 60 |
contracts/common/utils/solana/rbac/macros/src/instructions/get_default_admin.rs | 41 | 47 |
contracts/common/utils/solana/rbac/macros/src/instructions/grant_role.rs | 90 | 109 |
contracts/common/utils/solana/rbac/macros/src/instructions/mod.rs | 22 | 29 |
contracts/common/utils/solana/rbac/macros/src/instructions/renounce_role.rs | 69 | 85 |
contracts/common/utils/solana/rbac/macros/src/instructions/revoke_role.rs | 84 | 103 |
contracts/common/utils/solana/rbac/macros/src/lib.rs | 49 | 170 |
contracts/common/utils/solana/rbac/macros/src/only_role.rs | 36 | 51 |
contracts/common/utils/solana/rbac/macros/src/rbac.rs | 42 | 68 |
contracts/common/utils/solana/rbac/macros/src/role_type.rs | 52 | 65 |
contracts/common/utils/solana/rbac/macros/src/setup_default_admin.rs | 83 | 112 |
contracts/common/utils/solana/rbac/macros/src/state_types.rs | 40 | 90 |
contracts/common/utils/solana/rbac/macros/src/utils.rs | 49 | 64 |
contracts/common/utils/solana/rbac/src/errors.rs | 20 | 45 |
contracts/common/utils/solana/rbac/src/events.rs | 20 | 41 |
contracts/common/utils/solana/rbac/src/lib.rs | 7 | 83 |
contracts/common/utils/solana/rbac/src/traits.rs | 32 | 94 |
contracts/common/utils/solana/rbac/src/types.rs | 20 | 35 |
Findings 18
Main Review
17 findings · September 29 to October 9, 2026-
M-01 Medium init_console_oft reverts for every PermissionedBurn mint, so no console OFT can be deployed for one Compatibility Resolved
Description
init_console_oftcreatesoft_escrowwith Anchor'sinit, and for a Token-2022 mint Anchor's generated code sizes the account by listing the mint's extensions throughanchor-spl's re-exportedspl-token-2022-interface2.1.0. That version'sExtensionTypestops at 27 and maps unknown types toInvalidAccountData. PermissionedBurn is type 28, added in Token-2022 v11 and present only in interface 3.x, which the program itself uses. Everyanchor-splrelease, including 1.2.0 and master, still requires interface"2", the same kind of lag Anchor hit in anchor#2801.#[account( init, payer = payer, seeds = OFTStore::oft_escrow_seeds(&oft_store.key()), bump, token::authority = oft_store, token::mint = token_mint )] pub oft_escrow: Box<InterfaceAccount<'info, TokenAccount>>,As a result,
init_console_oftfails withInvalidAccountDatafor every PermissionedBurn mint in both custody modes and rolls back. A Mollusk test that runs the realconsole_oft, Token-2022 v11 and Endpoint programs returnsFailure(0, InvalidAccountData)for a PermissionedBurn mint andSuccessfor plain and transfer-hook mints.init_console_oftis the only way to create anOFTStore, so the PermissionedBurn setup this release adds (set_token_managerand the PermissionedBurn branch ofSend::burn_from_escrow) cannot be deployed.// tests/integration/poc_pb_init.rs (add `mod poc_pb_init;` to tests/integration/main.rs) // cargo test -p console-oft-integration-tests --locked poc_ -- --nocapture --test-threads=1 use crate::harness::*; use console_oft::state::RoleType as OftRole; use spl_token_2022_interface::extension::BaseStateWithExtensions; fn oapp_registry(oapp: Pubkey) -> Pubkey { Pubkey::find_program_address(&[b"OApp", oapp.as_ref()], &host(endpoint::ID)).0 } fn init_ix(h: &Harness, initializer: Pubkey, oft_type: ::oft::types::OftType) -> Instruction { let store = Pubkey::find_program_address(&[b"OFT", initializer.as_ref()], &program_id()).0; let endpoint_id = host(endpoint::ID); let mut instruction = ix( console_oft::ID, console_oft::accounts::InitConsoleOFT { payer: to_program_pubkey(&h.f.payer), initializer: to_program_pubkey(&initializer), oft_store: to_program_pubkey(&store), default_rate_limit: to_program_pubkey(&rate_limit_pda(&store, 0)), token_mint: to_program_pubkey(&h.f.token_mint), oft_escrow: to_program_pubkey(&oft_escrow_pda(&store)), fee_deposit: to_program_pubkey(&h.f.fee_deposit), token_program: to_program_pubkey(&h.token_program), system_program: Default::default(), admin_role_member: to_program_pubkey(&role_member_pda( &store, OftRole::DefaultAdmin, &h.f.admin, )), event_authority: to_program_pubkey(&event(program_id())), program: console_oft::ID, }, console_oft::instruction::InitConsoleOft { params: console_oft::instructions::InitConsoleOFTParams { oft_type, admin: to_program_pubkey(&h.f.admin), shared_decimals: TOKEN_DECIMALS - 2, }, }, ); instruction.accounts.extend([ AccountMeta::new_readonly(endpoint_id, false), AccountMeta::new(h.f.payer, true), AccountMeta::new_readonly(store, false), AccountMeta::new(oapp_registry(store), false), AccountMeta::new_readonly(Pubkey::default(), false), AccountMeta::new_readonly(event(endpoint_id), false), AccountMeta::new_readonly(endpoint_id, false), ]); instruction } fn fresh_initializer(h: &Harness) -> (Pubkey, Pubkey) { let initializer = Pubkey::new_unique(); h.f.insert(initializer, Account::new(100_000_000, 0, &SYSTEM_PROGRAM)); let store = Pubkey::find_program_address(&[b"OFT", initializer.as_ref()], &program_id()).0; (initializer, store) } #[test] fn poc_init_console_oft_fails_for_permissioned_burn_mint() { for (label, oft_type) in [ ("BurnMint", ::oft::types::OftType::BurnMint), ("LockUnlock", ::oft::types::OftType::LockUnlock), ] { let h = Harness::with_pb(false, false, true); let mint = h.account(h.f.token_mint); let exts = StateWithExtensions::<Mint>::unpack(&mint.data) .unwrap() .get_extension_types() .unwrap(); assert!(exts.contains(&ExtensionType::PermissionedBurn)); let (initializer, store) = fresh_initializer(&h); let result = h.run(&[init_ix(&h, initializer, oft_type)]); println!("{label} PB mint init result: {:?}", result.program_result); assert_eq!( result.program_result, TransactionProgramResult::Failure(0, ProgramError::InvalidAccountData), ); assert!(h.account(store).data.is_empty()); assert!(h.account(oft_escrow_pda(&store)).data.is_empty()); } } #[test] fn poc_control_init_succeeds_without_permissioned_burn() { for hook in [false, true] { let h = Harness::with_pb(false, hook, false); let (initializer, store) = fresh_initializer(&h); let result = h.run(&[init_ix(&h, initializer, ::oft::types::OftType::BurnMint)]); println!("hook={hook} non-PB mint init result: {:?}", result.program_result); assert!(result.program_result.is_ok()); assert_eq!(h.token(oft_escrow_pda(&store)).owner, store); } } // Output: // hook=false non-PB mint init result: Success // hook=true non-PB mint init result: Success // BurnMint PB mint init result: Failure(0, InvalidAccountData) // LockUnlock PB mint init result: Failure(0, InvalidAccountData) // test result: ok. 2 passed; 0 failedRecommendation
Create
oft_escrowwithout Anchor's extension-aware sizing: size it with the program's ownspl-token-2022-interface3.1.1, create the PDA through the System program with the escrow seeds, and CPIInitializeAccount3withoft_storeas owner. -
L-01 Low A recipient can close its empty frozen ATA to receive a credit the docs say is redirected Validation Resolved
Description
docs/usage.mdlists a frozen recipient on a mint that is not on Token ACL as a redirect trigger:the recipient's ATA is frozen and cannot be thawed (no policy selected, permissionless thaw disabled, or the mint not on Token ACL)
and parity doc D7 does the same: "frozen and not thawable (funded, or mint not ACL-governed) → redirect to escrow".
lz_receivecreatestoken_destwithinit_if_neededand only then reads its frozen bit:let frozen = ctx.accounts.token_dest.is_frozen(); let credit_to = match (frozen || policy_blocked, redirect_escrow) { (false, _) => ctx.accounts.token_dest.to_account_info(), (true, Some(escrow)) => escrow, (true, None) => return err!(OFTError::CreditBlocked), };Token-2022
process_close_accountdoes not check the frozen bit, only the balance:if !source_account.base.is_native() && u64::from(source_account.base.amount) != 0 { return Err(TokenError::NonNativeHasBalance.into()); }The owner of an empty frozen ATA can therefore close it and call
lz_receive, which is permissionless, in the same transaction. Unless the mint has DefaultAccountState set to Frozen, the recreated ATA starts unfrozen,frozenis false, and the full credit goes to the recipient instead of the escrow, with noCreditRedirectedevent.init_console_oftdoes not require DefaultAccountState, so this applies to any plain Token-2022 mint with a freeze authority. The recipient also reclaims the ATA rent, which the executor pays again.The token-manager usage doc and parity D4 say a freeze on an empty account is not a durable hold and that the policy is the tool for one, but only in the context of Token ACL's permissionless thaw. The console docs present the non-ACL case as a working hold.
A funded frozen ATA cannot be closed, and a policy-blocked recipient is not affected, because
policy_blockedis read from the policy record, not the account. The credit redirect path is new in this diff.Recommendation
Correct
docs/usage.mdand D7 to say that a freeze on an empty account is not a durable hold on any mint, and that the pubkey policy is the way to hold a recipient's credits. If the non-ACL freeze hold is meant to work, require a pubkey policy whenever redirect is configured, or reject a mint ininit_console_oftthat has a freeze authority but no DefaultAccountState Frozen. -
L-02 Low The compose docs say lz_compose has no sender to check, but anyone can queue a compose message Documentation Resolved
Description
The Endpoint's
send_composecan be called by any signer, and the caller becomes the message'sfrom, so anyone can queue a compose message to any composer. Inlz_compose, the composer'sclear_composeCPI only proves that the message really came fromparams.from. Whether that sender is a trusted OApp is the composer's job, just aslz_receivemust matchparams.senderto the stored peer. This release'slz-compose-types.mdsays the opposite: "there is no peer to check, sinceclear_composeitself binds the message to its sender". The receive macro documents its check under# Security(lz_receive.rs:6-17,lib.rs:33-45), but the composer macro has no such note, and the example composer checks onlyparams.to:#[account( mut, seeds = [COMPOSER_SEED], bump = composer_store.bump, constraint = composer_store.key() == params.to, )] pub composer_store: Account<'info, ComposerStore>,A composer built from these docs and examples acts on any compose message addressed to it. An attacker calls
send_composewith their own wallet asfromand a crafted payload, then calls the composer'slz_compose, andclear_composesucceeds. The same rule is stated elsewhere in this codebase and by LayerZero: the EVM composer docs requirerequire(_oApp == oApp, ...)alongside the Endpoint caller check,MultiHopComposer.sol:80-81enforces both, and the Stellar Endpoint'ssend_composesays "The composer MUST assert the sender because anyone can send compose msg with this function" (messaging_composer.rs:23). No in-scope program is a composer, so the risk falls on third-party composers built on this framework. V1 said nothing about the sender; the "no peer to check" line is new.Recommendation
Replace the "no peer to check" sentence with a statement that
clear_composeonly authenticatesparams.from, and thatlz_composemust requireparams.fromto be a trusted OApp such as a stored OFT key. Add a matching# Securitysection to the composer macro and#[composer_instruction], and show the check in the example composers. -
L-03 Low Confidential balances cannot be recovered or burned by pd_recover and pd_burn Logical Error Resolved
Description
pd_recoverandpd_burnact as the Permanent Delegate throughtransfer_checkedandburn_checked, which only debit the source's public balance. Token-2022 gives the Permanent Delegate no authority over confidential balances: every confidential instruction validates the account owner only.init_token_manageraccepts mints withConfidentialTransferMint, and the token-manager explicitly handles confidential accounts in its thaw emptiness checks (interface/src/acl/thaw.rs:44-48, README:248). On such a mint a holder can call the owner-only confidentialDeposit, which needs no proof and runs no transfer hook, so it succeeds before any block and also after a Blacklister blocks the owner, until a Freezer freezes the account.spl_token_2022::onchain::invoke_transfer_checked( &a.token_program.key(), a.source.to_account_info(), // debits the public amount only a.mint.to_account_info(), a.destination.to_account_info(), a.pd_signer.to_account_info(), // Permanent Delegate ctx.remaining_accounts, amount, a.mint.decimals, &[&[SIGNER_SEED, state.as_ref(), &[SignerKind::PermanentDelegate as u8], &[ctx.bumps.pd_signer]]], )?;Once the account is frozen,
pd_recoverfails withInsufficientFundsfor any amount above the public residue, andpd_burn, which does not thaw, burns at most the public balance even after a Thawer reopens the account. The shielded amount stays in the frozen account indefinitely: no issuer role can move or burn it, it remains in the mint supply, and the account cannot be closed while its confidential balance is nonzero. The holder recovers everything if the account is later unblocked and thawed. EVMERC20Plus.recoverFundsmoves any amount of a non-allowlisted holder's balance (ERC20Plus.sol:146-149), yet parity D9 states thatpd_recovermatchesrecoverFundsand names only the frozen versus blocked trigger as the divergence. An issuer relying on recovery for restitution or sanctions enforcement therefore cannot seize value a holder shielded in time.Recommendation
Document in the README and in parity D9 that confidential balances are outside
pd_recoverandpd_burn, and that issuers who need full recovery should either not enable confidential transfers or setauto_approve_new_accounts = falseand approve only trusted accounts, sinceDepositrequires an approved account. If confidential mints are not meant to be supported,init_token_managercan instead rejectConfidentialTransferMintwithUnsupportedExtension. -
L-04 Low Anyone can freeze the empty BurnMint escrow once the policy blocks oft_store, halting the OFT DoS Resolved
Description
The Token ACL gate approves a permissionless freeze of any token account that is empty and whose owner the pubkey policy blocks. It never checks whether that owner is a protocol account.
oft_escrowis owned byoft_store, and on a BurnMint OFT it is empty at rest:sendburns what it takes in and sweeps the fee, andlz_receivetransfers out what it mints. So as soon as the policy blocksoft_store, any signer can call Token ACLFreezePermissionlesson the escrow and the gate approves it. V1 had no permissionless freeze path, so no public actor could freeze the escrow.pub fn can_freeze(ctx: &Context<Self>) -> Result<()> { require!(ctx.accounts.subject_blocked()?, PolicyError::NotBlocked); ctx.accounts.require_empty() }A frozen escrow halts the OFT in both directions: the transfer into it on
sendand the mint into it onlz_receivefail withAccountFrozen.can_thawrefuses whileoft_storeis blocked, and after a Thawer reopens the escrow anyone can freeze it again. A normal admin action reaches this state: switching the policy to Whitelist mode beforeoft_storehas a whitelist record, since an unset record reads as not whitelisted.docs/usage.mdlists whitelistingoft_storeas a standing duty but does not order it before the mode switch, and parity D4 describes the permissionless layer as only moving accounts "worth nothing to hold". Nothing is lost: payloads stay retryable, and unblockingoft_storelets anyone thaw the escrow. A LockUnlock escrow is exposed the same way while it holds nothing.Recommendation
Exempt protocol accounts from the permissionless freeze: let the token-manager DefaultAdmin register owners such as
oft_store, the fee deposit's owner and the redirect escrow's owner, and havecan_freezerefuse them, while role-gated freezes stay available. Alternatively, document indocs/usage.mdthat these owners must be whitelisted before the policy switches to Whitelist mode and must never be blocked in any mode, sincecan_freezeapproves a freeze of any empty account whose owner the policy blocks. -
L-05 Low lz_receive_types_info reads a synced default ACL gate as "no config", so every receive fails to plan while a policy is selected Logical Error Resolved
Description
Receive discovery and the receive planner disagree on when the gate's thaw manifest is required. The planner requires the full ACL bundle whenever a policy is selected and the mint's freeze authority is its Token ACL
MintConfig, regardless of which gate the config names (requires_acl,manifest.rs:128). Discovery only names the manifest when the cached gate is notPubkey::default(). That cache is written bysync_acl_gating_program, which storesPubkey::default()both when the mint has no config and when the config's gate isPubkey::default(), without telling the two apart (sync_acl_gating_program.rs:26-32):// requires_acl: the gate is not a factor policy_selected && freeze_authority == COption::Some(mint_config_address(mint)) // lz_receive_types_info: the gate is a factor acl_thaw_metas: store .pubkey_policy .filter(|_| store.acl_gating_program != Pubkey::default()) .map(|_| acl::thaw_metas_address(&store.token_mint, &store.acl_gating_program)),The colliding state is reachable because the field comes from Token ACL, which
console_oftneither controls nor validates: at the pinned revision (token-manager README:7),CreateConfigandSetGatingProgramstore any gating program taken from instruction data (create_config.rs#L34-L35, set_gating_program.rs#L18-L28), and its CLI writesPubkey::default()when no gate is given (main.rs#L61). For such a mint with a selected policy, discovery omitsacl_thaw_metas, and the planner reads the gate from the config and fails atacl_thaw_metas.ok_or(OFTError::InvalidAclThawMetas)(lz_receive_types_v3.rs:212). Every inbound message fails planning, including plain deliveries to already thawed recipients. Re-runningsync_acl_gating_programdoes not help because the cache already holds the true value, althoughusage.md:35-38presents the sync as the fix forInvalidAclThawMetas. Naming the default gate's canonical (unallocated) manifest is enough for planning to succeed, and the execution helpers already treat that manifest as "no extras" (manifest.rs:42-44,59-61). Inbound traffic stays stuck, with payloads retryable, until an admin points the config at a real gate or clears the OFT's policy, which turns recipient screening off.Recommendation
In
lz_receive_types_info, name the canonical thaw manifest whenever a policy is selected, deriving it from the cached gate even when that gate isPubkey::default(), or store the cache asOption<Pubkey>so "no config" and "config with a default gate" stay distinct. -
I-01 Informational Redirect escrow requirements omit memo-required and confidential-only accounts Documentation Resolved
Description
set_credit_redirect_configvalidates the redirect escrow only against the frozen state, anddocs/usage.mdlists only "unfrozen when configured" and "keep the redirect escrow open" as escrow requirements. Token-2022process_transferalso refuses a destination with MemoTransfer required, which always fails here because the program never issues a memo. On mints with the ConfidentialTransferMint extension it also refuses a destination whose non-confidential credits are disabled. The escrow's owner can turn on either setting at any time.#[account( token::mint = token_mint, constraint = !redirect_escrow.is_frozen() @ OFTError::RedirectEscrowFrozen, constraint = redirect_escrow.owner != oft_store.key() @ OFTError::InvalidRedirectEscrow, )] pub redirect_escrow: Option<InterfaceAccount<'info, TokenAccount>>,lz_receivesends every credit for a blocked or frozen recipient to the configured escrow (credit_toinLzReceive::apply). With either setting on the escrow, that transfer fails withNoMemoorNonConfidentialTransfersDisabled, and every redirected receive reverts. Payloads stay retryable until the setting is turned off or the escrow is re-pointed. The docs cover the memo case only for the recipient and the fee deposit, and do not mention the confidential case for any account.Recommendation
Add to the standing duties in
docs/usage.mdthat the redirect escrow must not require incoming memos or disable non-confidential credits. Reject such an escrow inset_credit_redirect_confignext to the existing frozen check. -
I-02 Informational A zero-address recipient is reported as fully credited on Solana but as 0 on EVM Documentation Resolved
Description
The EVM
_creditgained credit redirect in this release and now reports 0 whenever the credit does not land at_to. A zero_tois minted to0xdead, so it now reports 0 in bothOFTReceivedand the compose message:address creditTo = _redirectCredit(_to, _amountLD); if (creditTo == address(0)) creditTo = address(0xdead); _mint(creditTo, _amountLD); return _to == creditTo ? _amountLD : 0;At
c0197e4the zero recipient was remapped before the mint and the full amount was returned, so both chains reported the same thing.On Solana,
bytes32(0)decodes toPubkey::default(), the System Program ID.lz_receivecreates that key's ATA and credits it, anddelivered_amountonly zeroes redirected credits:pub fn delivered_amount(redirected: bool, amount_ld: u64) -> u64 { if redirected { 0 } else { amount_ld } }The same message therefore reports the full amount on Solana and 0 on EVM. In both cases the tokens are unrecoverable, since nobody can sign for
0xdeador the System Program. The parity doc lists return-zero-on-redirect but not this case, so tooling that treats the reported amount as proof of payment reads the same message differently depending on the destination chain.Recommendation
Record the difference in
solana-evm-parity-analysis.md. On Solana the all-zero key is a real address rather than a sentinel, so documenting it is preferable to special-casing it inlz_receiveand the planner. -
I-03 Informational Conditional native-authority signer-meta requirements are not documented Documentation Resolved
Description
The
init_token_manager,set_pending_token_manager_admin, andinit_transfer_hookinstructions support plain signers, CPI-signing PDAs, and native multisigs through an unchecked authority account. Consequently, generated clients mark the authority as a non-signer even though plain signers and CPI-signing PDAs requireis_signer = true; only native multisig authority accounts should remain non-signers and provide their member signers as remaining accounts.Internal test helpers already adjust these account metas manually, but this requirement is not explained in the public integration documentation. Callers relying directly on generated instructions may therefore encounter unexpected
InvalidAuthorityorUnauthorizedfailures.Recommendation
Document the signer-meta requirements for authority types
-
I-04 Informational The README says a permanently blocked receive can be skipped, but skip cannot reach a verified payload Documentation Resolved
Description
This release refuses receives while a Token-2022 transfer fee is live, and the README tells operators that a live fee with a renounced fee authority "blocks them for good, leaving only
skipornilify". A receive that fails inlz_receiveis already verified, and the Endpoint'sverifyadvances the inbound nonce past every contiguously verified payload (verify.rs:76,messaging_channel.rs:47-64). The Endpoint'sskiponly accepts the next unverified nonce:#[account( mut, seeds = [ NONCE_SEED, params.receiver.as_ref(), ¶ms.src_eid.to_be_bytes(), ¶ms.sender[..] ], bump = nonce.bump, constraint = params.nonce == nonce.inbound_nonce + 1 @LayerZeroError::InvalidNonce )] pub nonce: Account<'info, Nonce>,An operator who follows the README calls
skipon the stuck payload and getsInvalidNonce.nilifyworks but only parks the payload: it sets the hash to nil, so the payload stays undeliverable and can be verified again (nilify.rs:56-66). The instructions that dispose of it areburnandclear, both available through theMessagingChannelManagerwrappers. Both requirenonce <= inbound_nonce(burn.rs:25,clear.rs:29), which every fee-blocked payload already meets, becauselz_receiveclears it on the Endpoint before crediting.skipis for a different case: a verified payload above a nonce gap, where skipping the missing nonce lets the inbound nonce advance past it. The new OApp README row and theendpoint_cpi::burndoc describeburnwithout its nonce condition.Recommendation
In README:156, replace "leaving only
skipornilify" with guidance to dispose of the stuck payloads withburnorclear, or to park them withnilify, and state thatskiponly applies to the next unverified nonce, for example to close a gap below a verified payload. -
I-05 Informational The parity doc's advice to hold an empty account by blacklisting has no effect in Open mode Documentation Resolved
Description
Parity section D4 covers Open mode on a Token ACL mint with permissionless thaw enabled. It correctly states that Open mode never consults membership and "blocks nobody" (lines 85 and 90-91). It then ends by telling operators that if a hold on an empty account has to stick, "the lever is blacklisting the subject", because that "makes permissionless thaw refuse" (lines 100-102). The code works as the earlier lines say.
ValidatedPubkeyPolicy::readloads and validates the subject's record, but in Open mode the result ignores its membership:pub fn allows(self, membership: Membership) -> bool { match self { Self::Open => true, Self::Blacklist => !membership.blacklisted, Self::Whitelist => membership.whitelisted, } }A subject with
blacklisted = truetherefore stays allowed while the policy is in Open mode. The gate'scan_thawapproves a public thaw of its empty account, andlz_receivecomputespolicy_blockedas false, thaws the frozen recipient account and credits it in full. An operator who follows the closing advice sets the flag and expects the hold to stick, but anyone can still thaw the account. The flag only takes effect once the policy is in Blacklist mode. Switching to Blacklist mode does not block anyone else, because a subject without a record stays allowed there.Recommendation
Rewrite the end of D4 to say that a hold on an empty account needs two steps: switch the policy to Blacklist mode and set the subject's
blacklistedflag. Note that in Blacklist mode a subject without a record stays allowed, so the switch affects only subjects that are explicitly blacklisted. -
I-06 Informational The successor-OFT guidance tells operators to move LockUnlock collateral, but Console OFT has no instruction or procedure for it Documentation Resolved
Description
In a LockUnlock OFT,
oft_escrowholds the collateral that backs tokens on remote chains. The escrow PDA is derived fromoft_store, so a successor OFT gets a new, empty escrow. The newusage.mdlists moving the collateral as one migration step, with no instruction or procedure for it:- **Successor OFT.** Pause, deliver or skip pending payloads to the old receiver, move LockUnlock collateral, restore rate-limit usage with `set_rate_limit_state`, then switch peers.Console OFT has no instruction that withdraws, sweeps or migrates the escrow balance (
lib.rs:41-262), and it never closes the escrow, changes its authority or revokes its delegate. For LockUnlock, funds leave the escrow only through the credit inlz_receiveand the fee transfer insend, and neither lets an admin choose the destination; the escrow burns insendonly run for BurnMint (send.rs:271). The one direct path is in token_manager. A Freezer freezes the escrow through Token ACL (freeze_token_account.rs:11). Then a Recoverer callspd_recover, which thaws the escrow, moves its balance using the Permanent Delegate signer, and freezes it again (pd_recover.rs:16-68). That path only exists on a Token-2022 mint whose Permanent Delegate and Token ACL authorities are held by the TokenManager root. On legacy SPL Token mints and on Token-2022 mints without a Permanent Delegate, the only remaining routes are workarounds: releasing the balance throughlz_receivewith a crafted message from a peer the admin controls, or upgrading the shared program, which affects every OFT instance. An operator who follows the guidance and switches peers leaves the successor without collateral, so its LockUnlock receives fail until it is funded, while the old balance stays locked in the old escrow.Recommendation
Replace the step in
usage.mdwith a complete procedure. Namepd_recoverand its prerequisites: a Token-2022 mint, Permanent Delegate and Token ACL authorities held by the root, a frozen source, and the Freezer and Recoverer roles. For every other mint, state that operators must either unwind the old escrow through inbound deliveries before switching peers or fund the successor escrow separately, and that the old escrow balance has no administrative withdrawal path. -
I-07 Informational pd_recover credits the destination net of Token-2022 transfer fees while FundsRecovered reports the gross amount Documentation Resolved
Description
PdRecover::apply passes the requested gross amount directly to Token-2022 transfer_checked without checking TransferFeeConfig or reconciling the destination delta. The instruction is documented as the Solana equivalent of EVM recoverFunds, whose post-condition transfers exactly the requested amount to the destination. On a fee-bearing Token-2022 mint, source funds decrease by the gross request while the destination receives only the net amount and the withheld fee remains separately withdrawable; FundsRecovered still emits the gross request.
Impact: For a requested recovery of 10,000 with a 1% fee, the source is reduced by 10,000, destination balance increases by only 9,900, and 100 is withheld and can be swept by the configured withdraw-withheld authority, while FundsRecovered.amount reports 10,000. Thus documented recovery semantics and off-chain event accounting overstate the destination recovery. Impact is bounded by the trusted mint fee configuration.
Recommendation
Document in the token_manager README
pd_recoversection and in the D9 entry of the parity analysis that, on a mint with a live Token-2022 transfer fee, the destination receives the recovered amount minus the fee. -
I-08 Informational The README names the wrong error for init_acl rejecting another mint's policy Documentation Resolved
Description
Step 5 of the Token ACL setup in the token-manager README says
init_aclrejects "a policy for another mint (InvalidConfig)" (lines 196-199). The handler raises a different error. After decoding the policy it compares the policy's mint with the root's mint and fails withWrongPolicyMint:let policy = PubkeyPolicy::try_deserialize(&mut &ctx.accounts.pubkey_policy.try_borrow_data()?[..])?; require_keys_eq!(policy.mint, ctx.accounts.mint.key(), TokenManagerError::WrongPolicyMint);In
TokenManagerErrorthese are two separate codes with separate meanings.InvalidConfig(7000) is "Invalid canonical Token ACL configuration", which the ACL helpers raise for a bad MintConfig.WrongPolicyMint(7005) is "The bound pubkey policy is for another mint". An integrator or operator tool that follows the README and matches onInvalidConfigto detect a wrong-mint policy never sees that code. A realWrongPolicyMintfailure then goes unrecognized, or a trueInvalidConfiggets misread as a policy-binding mistake. The README's own hook section (line 270) and the gate both useWrongPolicyMintfor the same condition, so the setup step is the one inconsistent statement.Recommendation
Change the README's step 5 to name
WrongPolicyMintas the errorinit_aclraises for a policy bound to another mint, matchinginit_acl.rs:70and the hook section. -
I-09 Informational The README's pause-authority setup is one pd_recover cannot resume Documentation Resolved
Description
The token-manager README says pausing and resuming "stay with the native pause authority (e.g. a 1-of-n multisig), which signs Token-2022 directly", and that a root holds
Pauseonly sopd_recovercan move funds while the mint is paused. Token-2022 stores a single pause authority, and the README's table assigns it to the root's Pause signer, so the two sentences describe mutually exclusive setups. The only configuration satisfying both is a native multisig with the Pause signer as a member, whichpd_recoverdoes not support because it resumes and re-pauses with the Pause signer itself as the authority and passes no multisig signers:let ix = toggle(&self.token_program.key(), &self.mint.key(), &self.pause_signer.key(), &[])?; invoke_as( &self.token_manager.key(), &[(SignerKind::Pause, bump)], &ix, &[info, self.pause_signer.to_account_info(), self.token_program.to_account_info()], )Token-2022's
process_toggle_pauserequires the supplied authority to equal the stored one, so under that setup everypd_recoveron a paused mint fails withOwnerMismatch. Recovery while paused then needs the pause multisig to co-sign a transaction that resumes, callspd_recoverand pauses again, so the instruction's own resume and re-pause logic goes unused. The only setup in which that logic works is the Pause signer holding the authority directly, and there the native key can no longer pause or resume without DefaultAdmin first moving the authority out withset_native_authority. The README describes a setup that the instruction's documented paused-mint handling does not support.Recommendation
State in the README that
pd_recoverresumes a paused mint only when the root's Pause signer is itself the pause authority, and that a native multisig authority must instead bundle resume,pd_recoverand pause in one transaction. Alternatively, accept a native multisig pause authority inPdRecover::set_pausedby passing the stored authority with the Pause signer as its signing member. -
I-10 Informational The README says a zero-fee send can omit the fee deposit, but decimal dust still requires it Documentation Resolved
Description
The Console OFT README defines the fee as the configured bps and says the fee hook group is "present only when a fee is charged" and that "a zero-fee send never uses the deposit and can omit its account", even while the deposit is frozen. The amount
sendsweeps to the deposit is not the bps fee but everything not bridged.debit_viewkeeps the full amount as sent and removes dust only from the received amount, sofee_ldincludes the shared-decimal dust:let oft_fee = fee_config::get_oft_fee(oft_store.default_fee_bps, fee_config, amount_ld); let amount_received_ld = oft_store.remove_dust(amount_ld - oft_fee); ... let fee_ld = amount_sent_ld - amount_received_ld; ... let endpoint_accounts = if fee_ld == 0 { rest } else { let (fee_hooks, rest) = TransferHookAccounts::take_prefix(&hook, rest)?; Self::collect_fee(ctx, fee_ld, fee_hooks.cpi_accounts())?; rest };On a mint whose local decimals exceed the shared decimals, a 0-bps send of any amount that is not a multiple of
ld2sd_ratehas a non-zerofee_ld, sosendexpects a fee hook group and transfers the dust to the deposit. An integrator that follows the README and omits the deposit on a 0-bps route getsMissingFeeDeposit, one that omits the fee hook group on a hook mint has the Endpoint accounts parsed as that group, and while the deposit is frozen every such send reverts at the native transfer, although the README tells operators those routes keep working. Thefee_depositaccount comment ("Optional when the collected fee (including decimal dust) is zero") states the actual rule, but the README contradicts it.Recommendation
Change both README sentences to say that the fee deposit and the fee hook group are required whenever the collected amount, the bps fee plus decimal dust, is non-zero, which includes 0-bps sends of amounts that are not a multiple of the shared-decimal rate. State that a frozen deposit therefore blocks those sends as well as fee-bearing ones.
-
I-11 Informational The successor TokenManager migration has the old root hand over the authority step 1 already moved to a signing key Documentation Resolved
Description
The procedure in
docs/usage.mdfor migrating a mint from one TokenManager program to a successor program says that if every authority sits on the old root, step 1 first moves one of them to a signing key withset_native_authority, so that key can create the successor root. Step 3 then has the old root runset_acl_gating_programandset_native_authorityfor Acl, PermissionedBurn, PermanentDelegate and Pause to the successor's signer PDAs. The old root signs every handover only as its own signer PDA for that kind, so it can no longer move the authority step 1 moved away:#[account(seeds = [SIGNER_SEED, token_manager.key().as_ref(), &[kind as u8]], bump)] pub signer: UncheckedAccount<'info>, invoke_as(&state, &[(kind, ctx.bumps.signer)], &ix, &infos)?;Followed as written, the procedure therefore stops at step 3 whichever of Acl, PermissionedBurn or PermanentDelegate step 1 moved. If it moved PermissionedBurn or PermanentDelegate, step 3's
set_native_authorityfor that kind reverts because Token-2022 no longer sees the old PDA as the authority. If it moved Acl, the signing key is now Token ACL's logical admin, so the first call of step 3,set_acl_gating_program(which signs as the old Acl PDA), and the laterset_native_authority(Acl)both fail with Token ACLInvalidAuthority, and the successor gate is never wired in by the documented calls. The procedure only completes once the operator works out that the signing key must hand its authority over natively, which the document never says.Recommendation
In step 3, state that the signing key itself hands over the authority moved in step 1 (Token-2022
SetAuthority, or Token ACLSetGatingProgramandSetAuthorityfor Acl), while the old root moves only the authorities it still holds.
Remediation Review 1
1 finding · October 9, 2026-
I-01 Informational set_acl_permissions reverts on unchanged flags "as on EVM", but EVM's two-flag setter stores and emits Documentation Resolved
Description
set_acl_permissionsnow fails withAclPermissionsIdempotent(7012) when Token ACL's permissionless freeze and thaw flags already hold the requested values. Both the handler's doc comment and the README justify this as EVM behaviour ("as EVM's boolean setters do", "As on EVM, setters of a binary state (pause,unpause,set_acl_permissions) fail"). Token ACL permissionless freeze and thaw have no EVM counterpart, and the one EVM setter with the same shape, two booleans written together, does not revert on an unchanged value:function _setRateLimitGlobalConfig(RateLimitGlobalConfig memory _globalConfig) internal virtual { RateLimiterStorage storage $ = _getRateLimiterStorage(); $.useGlobalStateFlag = _globalConfig.useGlobalState; $.isGloballyDisabledFlag = _globalConfig.isGloballyDisabled; emit RateLimitGlobalConfigUpdated(_globalConfig); }Console OFT's
set_rate_limit_global_configmirrors that EVM setter and stores and emits on every call, so the deployment now has two two-flag admin setters with opposite behaviour on an unchanged request. Before this change both stored and emitted. An operator or tooling author who reads "binary setters revert, as on EVM" expects a repeatedset_rate_limit_global_configto fail, or a repeatedset_acl_permissionsto succeed and emit, as it did previously and as EVM's two-flag setter does. Either expectation is wrong for one of the two instructions.Recommendation
Remove the EVM attribution for
set_acl_permissionsfrom the README and theManageAcl::permissionsdoc comment, describing the revert as a Solana-only rule that follows the program's binary-state convention. Documentset_rate_limit_global_configas a deliberate value setter that stores and emits on every call to match EVMsetRateLimitGlobalConfig, so the exception is explicit.
No findings match.
More from LayerZero
All 12 reportsPut your code through the same review.
This review started with a conversation about scope. Tell us what you are building and we will plan yours with you.