Skip to content
We manage your security to weather the AI storm →

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
Chains
Ethereum, Solana, Stellar
Sector
Cross-chain
  • 0 Critical
  • 0 High
  • 1 Medium
  • 5 Low
  • 12 Informational

18 resolved

Scope

  • GuardianOrg/mirror-layerzero-labs-audit-external fc4a9343644d6e6826f78811f4f61b05f892f6
192 files in scope · 6,453 nSLOC
FilenSLOCLines
apps/oft-app/contracts/solana/oft/src/events.rs036
apps/project-types/console-oft-app/contracts/solana/Cargo.toml3857
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/Cargo.toml2862
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/codec/compose_msg.rs21104
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/codec/mod.rs02
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/codec/msg.rs20107
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/console_oft_info.rs148
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/errors.rs70131
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/events.rs35150
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/credit_redirect.rs2127
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/mod.rs1164
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/pubkey_policy.rs3444
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/receive_accounts.rs6897
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/token2022.rs100140
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/transfer_hook_accounts.rs81100
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/transfer_hook_plan.rs6087
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_config/fee_config_view.rs17154
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_config/mod.rs010
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_config/set_default_fee_bps.rs024
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_config/set_fee_bps.rs060
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_handler/mod.rs03
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/fee_handler/set_fee_deposit.rs236
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/init_console_oft_info.rs033
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/init_console_oft.rs14135
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive_types_info.rs3971
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive_types_v3.rs285347
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive.rs134423
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/mod.rs1037
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/oft_store_view.rs047
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/pause/mod.rs07
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/pause/pause_config_view.rs037
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/pause/set_default_paused.rs037
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/pause/set_paused.rs076
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/quote_oft.rs097
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/quote_send.rs180
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/checkpoint_rate_limit.rs369
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/get_rate_limit_usages.rs045
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/is_rate_limit_address_exempt.rs025
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/mod.rs017
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/rate_limits.rs030
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/set_rate_limit_address_exemption.rs069
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/set_rate_limit_config.rs059
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/set_rate_limit_global_config.rs040
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/set_rate_limit_state.rs069
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/send.rs158485
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/set_credit_redirect_config.rs3649
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/set_pubkey_policy.rs2237
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/set_token_manager.rs1930
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/sync_acl_gating_program.rs2940
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/sync_transfer_hook_program.rs941
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/lib.rs29263
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/seeds.rs05
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/state/mod.rs10130
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/state/oft.rs1093
apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/state/rate_limit.rs171703
apps/project-types/oapp-app/contracts/solana/Cargo.toml930
apps/project-types/oapp-app/contracts/solana/macros/Cargo.toml123
apps/project-types/oapp-app/contracts/solana/macros/src/composer.rs241
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/composer/lz_compose_types_info.rs129
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/composer/lz_compose_types_v3.rs1118
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/composer/lz_compose.rs017
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/composer/mod.rs223
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/mod.rs04
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/accept_default_admin_transfer.rs050
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/burn.rs5969
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/clear.rs6070
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/get_enforced_options.rs057
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/get_peer.rs055
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/init_enforced_options.rs087
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/is_compose_msg_sender.rs044
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/lz_receive_types_info.rs126
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/lz_receive_types_v3.rs1117
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/lz_receive.rs033
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/mod.rs1049
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/next_nonce.rs052
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/nilify.rs5969
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/set_enforced_options.rs0101
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/set_peer.rs074
apps/project-types/oapp-app/contracts/solana/macros/src/instructions/oapp/skip.rs5868
apps/project-types/oapp-app/contracts/solana/macros/src/lib.rs081
apps/project-types/oapp-app/contracts/solana/macros/src/oapp.rs580
apps/project-types/oapp-app/contracts/solana/macros/src/state_types.rs079
apps/project-types/oapp-app/contracts/solana/src/common.rs474
apps/project-types/oapp-app/contracts/solana/src/endpoint_cpi.rs84528
apps/project-types/oapp-app/contracts/solana/src/errors.rs317
apps/project-types/oapp-app/contracts/solana/src/events.rs026
apps/project-types/oapp-app/contracts/solana/src/lib.rs796
apps/project-types/oapp-app/contracts/solana/src/lz_compose_types_v3.rs4772
apps/project-types/oapp-app/contracts/solana/src/lz_plan.rs4271
apps/project-types/oapp-app/contracts/solana/src/lz_receive_types_v3.rs90120
apps/project-types/oapp-app/contracts/solana/src/oapp_info.rs1278
apps/project-types/oapp-app/contracts/solana/src/options.rs5137
apps/project-types/oapp-app/contracts/solana/src/types.rs28158
apps/project-types/oapp-app/contracts/solana/src/utils.rs014
apps/token-app/contracts/solana/pubkey-policy-hook/Cargo.toml1821
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/Cargo.toml3236
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/errors.rs88
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/events.rs78
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/instructions/init_transfer_hook.rs7397
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/instructions/mod.rs45
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/instructions/transfer_hook.rs4985
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/lib.rs2333
apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/state.rs4451
apps/token-app/contracts/solana/token-manager/Cargo.toml4548
apps/token-app/contracts/solana/token-manager/interface/Cargo.toml1921
apps/token-app/contracts/solana/token-manager/interface/src/acl/manifest.rs233283
apps/token-app/contracts/solana/token-manager/interface/src/acl/mod.rs2036
apps/token-app/contracts/solana/token-manager/interface/src/acl/thaw.rs138171
apps/token-app/contracts/solana/token-manager/interface/src/burn.rs3447
apps/token-app/contracts/solana/token-manager/interface/src/lib.rs1016
apps/token-app/contracts/solana/token-manager/interface/src/seeds.rs2430
apps/token-app/contracts/solana/token-manager/interface/src/state.rs4258
apps/token-app/contracts/solana/token-manager/interface/src/version.rs1321
apps/token-app/contracts/solana/token-manager/programs/token_manager/Cargo.toml3741
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/authority.rs3646
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/errors.rs2222
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/events.rs7080
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/freeze_token_account.rs4765
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/gate.rs4588
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/helpers.rs7788
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/init_acl.rs6086
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/manage_acl.rs7896
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/mod.rs1112
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/thaw_token_account.rs4765
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/get_version.rs58
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/mod.rs1213
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/native_authority/mod.rs23
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/native_authority/set_native_authority.rs91111
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/mod.rs45
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/pd_burn.rs92114
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/pd_recover.rs109150
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permissioned_burn/burn.rs97123
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permissioned_burn/mod.rs23
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/root/init_token_manager.rs87113
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/root/mod.rs45
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/root/rbac_default_admin.rs5369
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/lib.rs87133
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/state.rs13
apps/token-app/contracts/solana/token-manager/programs/token_manager/src/types.rs2736
contracts/common/framework/solana/anchor-trait/Cargo.toml3339
contracts/common/framework/solana/anchor-trait/src/assembly.rs58105
contracts/common/framework/solana/anchor-trait/src/generation.rs130205
contracts/common/framework/solana/anchor-trait/src/lib.rs53134
contracts/common/framework/solana/anchor-trait/src/overrides.rs168271
contracts/common/utils/solana/heap-allocator/Cargo.toml56
contracts/common/utils/solana/heap-allocator/lib/Cargo.toml1012
contracts/common/utils/solana/heap-allocator/lib/src/lib.rs5395
contracts/common/utils/solana/program-id/Cargo.toml56
contracts/common/utils/solana/program-id/lib/Cargo.toml1316
contracts/common/utils/solana/program-id/lib/src/lib.rs3057
contracts/common/utils/solana/pubkey-policy/Cargo.toml2124
contracts/common/utils/solana/pubkey-policy/interface/Cargo.toml1417
contracts/common/utils/solana/pubkey-policy/interface/src/error.rs2031
contracts/common/utils/solana/pubkey-policy/interface/src/lib.rs1219
contracts/common/utils/solana/pubkey-policy/interface/src/pubkey_policy.rs209257
contracts/common/utils/solana/pubkey-policy/interface/src/seeds.rs1320
contracts/common/utils/solana/pubkey-policy/interface/src/state.rs5369
contracts/common/utils/solana/pubkey-policy/interface/src/version.rs1321
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/Cargo.toml2832
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/errors.rs811
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/events.rs2427
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/get_version.rs58
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/init_pubkey_policy.rs4556
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/membership.rs1523
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/mod.rs1112
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/set_blacklisted.rs4856
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/set_mode.rs2428
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/instructions/set_whitelisted.rs4856
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/lib.rs4158
contracts/common/utils/solana/pubkey-policy/programs/pubkey_policy/src/types.rs2429
contracts/common/utils/solana/rbac/Cargo.toml3037
contracts/common/utils/solana/rbac/macros/Cargo.toml1416
contracts/common/utils/solana/rbac/macros/src/init_default_admin.rs4573
contracts/common/utils/solana/rbac/macros/src/instructions/accept_default_admin_transfer.rs97114
contracts/common/utils/solana/rbac/macros/src/instructions/begin_default_admin_transfer.rs5260
contracts/common/utils/solana/rbac/macros/src/instructions/get_default_admin.rs4147
contracts/common/utils/solana/rbac/macros/src/instructions/grant_role.rs90109
contracts/common/utils/solana/rbac/macros/src/instructions/mod.rs2229
contracts/common/utils/solana/rbac/macros/src/instructions/renounce_role.rs6985
contracts/common/utils/solana/rbac/macros/src/instructions/revoke_role.rs84103
contracts/common/utils/solana/rbac/macros/src/lib.rs49170
contracts/common/utils/solana/rbac/macros/src/only_role.rs3651
contracts/common/utils/solana/rbac/macros/src/rbac.rs4268
contracts/common/utils/solana/rbac/macros/src/role_type.rs5265
contracts/common/utils/solana/rbac/macros/src/setup_default_admin.rs83112
contracts/common/utils/solana/rbac/macros/src/state_types.rs4090
contracts/common/utils/solana/rbac/macros/src/utils.rs4964
contracts/common/utils/solana/rbac/src/errors.rs2045
contracts/common/utils/solana/rbac/src/events.rs2041
contracts/common/utils/solana/rbac/src/lib.rs783
contracts/common/utils/solana/rbac/src/traits.rs3294
contracts/common/utils/solana/rbac/src/types.rs2035

Findings 18

Main Review

17 findings · September 29 to October 9, 2026
  1. M-01 Medium init_console_oft reverts for every PermissionedBurn mint, so no console OFT can be deployed for one Compatibility Resolved
    Location
    apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/init_console_oft.rs:InitConsoleOFT.oft_escrow, apps/project-types/console-oft-app/contracts/solana/Cargo.lock (anchor-spl 1.1.2 -> spl-token-2022-interface 2.1.0)
    Round
    Main Review

    Description

    init_console_oft creates oft_escrow with Anchor's init, and for a Token-2022 mint Anchor's generated code sizes the account by listing the mint's extensions through anchor-spl's re-exported spl-token-2022-interface 2.1.0. That version's ExtensionType stops at 27 and maps unknown types to InvalidAccountData. PermissionedBurn is type 28, added in Token-2022 v11 and present only in interface 3.x, which the program itself uses. Every anchor-spl release, 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_oft fails with InvalidAccountData for every PermissionedBurn mint in both custody modes and rolls back. A Mollusk test that runs the real console_oft, Token-2022 v11 and Endpoint programs returns Failure(0, InvalidAccountData) for a PermissionedBurn mint and Success for plain and transfer-hook mints. init_console_oft is the only way to create an OFTStore, so the PermissionedBurn setup this release adds (set_token_manager and the PermissionedBurn branch of Send::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 failed
    

    Recommendation

    Create oft_escrow without Anchor's extension-aware sizing: size it with the program's own spl-token-2022-interface 3.1.1, create the PDA through the System program with the escrow seeds, and CPI InitializeAccount3 with oft_store as owner.

  2. L-01 Low A recipient can close its empty frozen ATA to receive a credit the docs say is redirected Validation Resolved
    Location
    apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive.rs:apply() apps/project-types/console-oft-app/contracts/solana/docs/usage.md apps/project-types/console-oft-app/contracts/solana/docs/solana-evm-parity-analysis.md
    Round
    Main Review

    Description

    docs/usage.md lists 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_receive creates token_dest with init_if_needed and 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_account does 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, frozen is false, and the full credit goes to the recipient instead of the escrow, with no CreditRedirected event. init_console_oft does 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_blocked is read from the policy record, not the account. The credit redirect path is new in this diff.

    Recommendation

    Correct docs/usage.md and 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 in init_console_oft that has a freeze authority but no DefaultAccountState Frozen.

  3. L-02 Low The compose docs say lz_compose has no sender to check, but anyone can queue a compose message Documentation Resolved
    Location
    apps/project-types/oapp-app/contracts/solana/docs/lz-compose-types.md:21-22, apps/project-types/oapp-app/contracts/solana/macros/src/instructions/composer/lz_compose.rs, apps/project-types/oapp-app/contracts/solana/macros/src/lib.rs
    Round
    Main Review

    Description

    The Endpoint's send_compose can be called by any signer, and the caller becomes the message's from, so anyone can queue a compose message to any composer. In lz_compose, the composer's clear_compose CPI only proves that the message really came from params.from. Whether that sender is a trusted OApp is the composer's job, just as lz_receive must match params.sender to the stored peer. This release's lz-compose-types.md says the opposite: "there is no peer to check, since clear_compose itself 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 only params.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_compose with their own wallet as from and a crafted payload, then calls the composer's lz_compose, and clear_compose succeeds. The same rule is stated elsewhere in this codebase and by LayerZero: the EVM composer docs require require(_oApp == oApp, ...) alongside the Endpoint caller check, MultiHopComposer.sol:80-81 enforces both, and the Stellar Endpoint's send_compose says "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_compose only authenticates params.from, and that lz_compose must require params.from to be a trusted OApp such as a stored OFT key. Add a matching # Security section to the composer macro and #[composer_instruction], and show the check in the example composers.

  4. L-03 Low Confidential balances cannot be recovered or burned by pd_recover and pd_burn Logical Error Resolved
    Location
    apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/pd_recover.rs:apply(), apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/pd_burn.rs:apply(), apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/root/init_token_manager.rs, apps/project-types/console-oft-app/contracts/solana/docs/solana-evm-parity-analysis.md (D9)
    Round
    Main Review

    Description

    pd_recover and pd_burn act as the Permanent Delegate through transfer_checked and burn_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_manager accepts mints with ConfidentialTransferMint, 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 confidential Deposit, 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_recover fails with InsufficientFunds for any amount above the public residue, and pd_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. EVM ERC20Plus.recoverFunds moves any amount of a non-allowlisted holder's balance (ERC20Plus.sol:146-149), yet parity D9 states that pd_recover matches recoverFunds and 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_recover and pd_burn, and that issuers who need full recovery should either not enable confidential transfers or set auto_approve_new_accounts = false and approve only trusted accounts, since Deposit requires an approved account. If confidential mints are not meant to be supported, init_token_manager can instead reject ConfidentialTransferMint with UnsupportedExtension.

  5. L-04 Low Anyone can freeze the empty BurnMint escrow once the policy blocks oft_store, halting the OFT DoS Resolved
    Location
    apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/gate.rs:can_freeze(), apps/project-types/console-oft-app/contracts/solana/docs/usage.md
    Round
    Main Review

    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_escrow is owned by oft_store, and on a BurnMint OFT it is empty at rest: send burns what it takes in and sweeps the fee, and lz_receive transfers out what it mints. So as soon as the policy blocks oft_store, any signer can call Token ACL FreezePermissionless on 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 send and the mint into it on lz_receive fail with AccountFrozen. can_thaw refuses while oft_store is 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 before oft_store has a whitelist record, since an unset record reads as not whitelisted. docs/usage.md lists whitelisting oft_store as 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 unblocking oft_store lets 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 have can_freeze refuse them, while role-gated freezes stay available. Alternatively, document in docs/usage.md that these owners must be whitelisted before the policy switches to Whitelist mode and must never be blocked in any mode, since can_freeze approves a freeze of any empty account whose owner the policy blocks.

  6. 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
    Location
    apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive_types_info.rs:59-62, apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/sync_acl_gating_program.rs:26-33, apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive_types_v3.rs:153-160,212, apps/token-app/contracts/solana/token-manager/interface/src/acl/manifest.rs:123-129
    Round
    Main Review

    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 not Pubkey::default(). That cache is written by sync_acl_gating_program, which stores Pubkey::default() both when the mint has no config and when the config's gate is Pubkey::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_oft neither controls nor validates: at the pinned revision (token-manager README:7), CreateConfig and SetGatingProgram store any gating program taken from instruction data (create_config.rs#L34-L35, set_gating_program.rs#L18-L28), and its CLI writes Pubkey::default() when no gate is given (main.rs#L61). For such a mint with a selected policy, discovery omits acl_thaw_metas, and the planner reads the gate from the config and fails at acl_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-running sync_acl_gating_program does not help because the cache already holds the true value, although usage.md:35-38 presents the sync as the fix for InvalidAclThawMetas. 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 is Pubkey::default(), or store the cache as Option<Pubkey> so "no config" and "config with a default gate" stay distinct.

  7. I-01 Informational Redirect escrow requirements omit memo-required and confidential-only accounts Documentation Resolved
    Location
    apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/set_credit_redirect_config.rs:SetCreditRedirectConfig apps/project-types/console-oft-app/contracts/solana/docs/usage.md
    Round
    Main Review

    Description

    set_credit_redirect_config validates the redirect escrow only against the frozen state, and docs/usage.md lists only "unfrozen when configured" and "keep the redirect escrow open" as escrow requirements. Token-2022 process_transfer also 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_receive sends every credit for a blocked or frozen recipient to the configured escrow (credit_to in LzReceive::apply). With either setting on the escrow, that transfer fails with NoMemo or NonConfidentialTransfersDisabled, 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.md that the redirect escrow must not require incoming memos or disable non-confidential credits. Reject such an escrow in set_credit_redirect_config next to the existing frozen check.

  8. I-02 Informational A zero-address recipient is reported as fully credited on Solana but as 0 on EVM Documentation Resolved
    Location
    apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/helpers/credit_redirect.rs:delivered_amount() apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive.rs:apply() apps/project-types/console-oft-app/contracts/solana/docs/solana-evm-parity-analysis.md
    Round
    Main Review

    Description

    The EVM _credit gained credit redirect in this release and now reports 0 whenever the credit does not land at _to. A zero _to is minted to 0xdead, so it now reports 0 in both OFTReceived and the compose message:

    address creditTo = _redirectCredit(_to, _amountLD);
    if (creditTo == address(0)) creditTo = address(0xdead);
    _mint(creditTo, _amountLD);
    return _to == creditTo ? _amountLD : 0;
    

    At c0197e4 the 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 to Pubkey::default(), the System Program ID. lz_receive creates that key's ATA and credits it, and delivered_amount only 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 0xdead or 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 in lz_receive and the planner.

  9. I-03 Informational Conditional native-authority signer-meta requirements are not documented Documentation Resolved
    Location
    apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/root/init_token_manager.rs:29-31, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/root/rbac_default_admin.rs:31-40, apps/token-app/contracts/solana/pubkey-policy-hook/programs/pubkey_policy_hook/src/instructions/init_transfer_hook.rs:15-29
    Round
    Main Review

    Description

    The init_token_manager, set_pending_token_manager_admin, and init_transfer_hook instructions 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 require is_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 InvalidAuthority or Unauthorized failures.

    Recommendation

    Document the signer-meta requirements for authority types

  10. I-04 Informational The README says a permanently blocked receive can be skipped, but skip cannot reach a verified payload Documentation Resolved
    Location
    apps/project-types/console-oft-app/contracts/solana/README.md:150-157, apps/project-types/oapp-app/contracts/solana/README.md:72, apps/project-types/oapp-app/contracts/solana/src/endpoint_cpi.rs:burn()
    Round
    Main Review

    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 skip or nilify". A receive that fails in lz_receive is already verified, and the Endpoint's verify advances the inbound nonce past every contiguously verified payload (verify.rs:76, messaging_channel.rs:47-64). The Endpoint's skip only accepts the next unverified nonce:

    #[account(
        mut,
        seeds = [
            NONCE_SEED,
            params.receiver.as_ref(),
            &params.src_eid.to_be_bytes(),
            &params.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 skip on the stuck payload and gets InvalidNonce. nilify works 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 are burn and clear, both available through the MessagingChannelManager wrappers. Both require nonce <= inbound_nonce (burn.rs:25, clear.rs:29), which every fee-blocked payload already meets, because lz_receive clears it on the Endpoint before crediting. skip is 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 the endpoint_cpi::burn doc describe burn without its nonce condition.

    Recommendation

    In README:156, replace "leaving only skip or nilify" with guidance to dispose of the stuck payloads with burn or clear, or to park them with nilify, and state that skip only applies to the next unverified nonce, for example to close a gap below a verified payload.

  11. I-05 Informational The parity doc's advice to hold an empty account by blacklisting has no effect in Open mode Documentation Resolved
    Location
    apps/project-types/console-oft-app/contracts/solana/docs/solana-evm-parity-analysis.md:85-102, contracts/common/utils/solana/pubkey-policy/interface/src/state.rs:13-19, contracts/common/utils/solana/pubkey-policy/interface/src/pubkey_policy.rs:74-83, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/gate.rs:53-56, apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/lz_receive.rs:184
    Round
    Main Review

    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::read loads 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 = true therefore stays allowed while the policy is in Open mode. The gate's can_thaw approves a public thaw of its empty account, and lz_receive computes policy_blocked as 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 blacklisted flag. Note that in Blacklist mode a subject without a record stays allowed, so the switch affects only subjects that are explicitly blacklisted.

  12. 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
    Location
    apps/project-types/console-oft-app/contracts/solana/docs/usage.md:91-92, apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/lib.rs:41-262, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/pd_recover.rs:16-68, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/freeze_token_account.rs:11
    Round
    Main Review

    Description

    In a LockUnlock OFT, oft_escrow holds the collateral that backs tokens on remote chains. The escrow PDA is derived from oft_store, so a successor OFT gets a new, empty escrow. The new usage.md lists 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 in lz_receive and the fee transfer in send, and neither lets an admin choose the destination; the escrow burns in send only 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 calls pd_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 through lz_receive with 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.md with a complete procedure. Name pd_recover and 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.

  13. I-07 Informational pd_recover credits the destination net of Token-2022 transfer fees while FundsRecovered reports the gross amount Documentation Resolved
    Location
    packages/mirror-layerzero-labs-audit-external/apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/pd_recover.rs:PdRecover::apply:L82-L110
    Round
    Main Review

    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_recover section 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.

  14. I-08 Informational The README names the wrong error for init_acl rejecting another mint's policy Documentation Resolved
    Location
    apps/token-app/contracts/solana/token-manager/README.md:196-199, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/init_acl.rs:68-70, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/errors.rs:3-4,13-14
    Round
    Main Review

    Description

    Step 5 of the Token ACL setup in the token-manager README says init_acl rejects "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 with WrongPolicyMint:

    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 TokenManagerError these 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 on InvalidConfig to detect a wrong-mint policy never sees that code. A real WrongPolicyMint failure then goes unrecognized, or a true InvalidConfig gets misread as a policy-binding mistake. The README's own hook section (line 270) and the gate both use WrongPolicyMint for the same condition, so the setup step is the one inconsistent statement.

    Recommendation

    Change the README's step 5 to name WrongPolicyMint as the error init_acl raises for a policy bound to another mint, matching init_acl.rs:70 and the hook section.

  15. I-09 Informational The README's pause-authority setup is one pd_recover cannot resume Documentation Resolved
    Location
    apps/token-app/contracts/solana/token-manager/README.md:84-93, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/permanent_delegate/pd_recover.rs:78-80,99-101,123-135
    Round
    Main Review

    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 Pause only so pd_recover can 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, which pd_recover does 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_pause requires the supplied authority to equal the stored one, so under that setup every pd_recover on a paused mint fails with OwnerMismatch. Recovery while paused then needs the pause multisig to co-sign a transaction that resumes, calls pd_recover and 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 with set_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_recover resumes 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_recover and pause in one transaction. Alternatively, accept a native multisig pause authority in PdRecover::set_paused by passing the stored authority with the Pause signer as its signing member.

  16. I-10 Informational The README says a zero-fee send can omit the fee deposit, but decimal dust still requires it Documentation Resolved
    Location
    apps/project-types/console-oft-app/contracts/solana/README.md:128-135, apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/send.rs:217-243,366-376,424-435
    Round
    Main Review

    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 send sweeps to the deposit is not the bps fee but everything not bridged. debit_view keeps the full amount as sent and removes dust only from the received amount, so fee_ld includes 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_rate has a non-zero fee_ld, so send expects 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 gets MissingFeeDeposit, 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. The fee_deposit account 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.

  17. 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
    Location
    apps/token-app/contracts/solana/token-manager/docs/usage.md:47-58, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/native_authority/set_native_authority.rs:24-26,83-90,101, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/manage_acl.rs:71-87
    Round
    Main Review

    Description

    The procedure in docs/usage.md for 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 with set_native_authority, so that key can create the successor root. Step 3 then has the old root run set_acl_gating_program and set_native_authority for 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_authority for 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 later set_native_authority(Acl) both fail with Token ACL InvalidAuthority, 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 ACL SetGatingProgram and SetAuthority for Acl), while the old root moves only the authorities it still holds.

Remediation Review 1

1 finding · October 9, 2026
  1. I-01 Informational set_acl_permissions reverts on unchanged flags "as on EVM", but EVM's two-flag setter stores and emits Documentation Resolved
    Location
    apps/token-app/contracts/solana/token-manager/README.md:195-197, apps/token-app/contracts/solana/token-manager/programs/token_manager/src/instructions/acl/manage_acl.rs:41-50, apps/project-types/console-oft-app/contracts/solana/programs/console_oft/src/instructions/rate_limiter/set_rate_limit_global_config.rs:18-27, contracts/common/utils/evm/upgradeable/contracts/rate-limiter/RateLimiterBaseUpgradeable.sol:531-536
    Round
    Remediation Review 1

    Description

    set_acl_permissions now fails with AclPermissionsIdempotent (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_config mirrors 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 repeated set_rate_limit_global_config to fail, or a repeated set_acl_permissions to 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_permissions from the README and the ManageAcl::permissions doc comment, describing the revert as a Solana-only rule that follows the program's binary-state convention. Document set_rate_limit_global_config as a deliberate value setter that stores and emits on every call to match EVM setRateLimitGlobalConfig, so the exception is explicit.

More from LayerZero

All 12 reports
  1. NilifyDelegate

    1 finding 1 finding: 1 informational
  2. Canton BurnMint Adapter

    3 findings 3 findings: 2 low, 1 informational
  3. OneSig on Canton

    32 findings 32 findings: 5 medium, 23 low, 4 informational
  4. OneSig on Solana

    27 findings 27 findings: 3 low, 24 informational

Put 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.

Get a quote