Skip to content

What this page showsOne instruction (an action a wallet lists) of Kamino Lending (KLend): whether the code that runs it is the code an audit reviewed, why, and the recorded transactions that called it.

Verdict

Changed

The reviewed commit and the live source are both established, and the handler file or a traced related file changed between them.

Checked against the snapshot at slot 471,652,463

The proof chain
  1. Instruction decoded

    Established

    The instruction bytes match one entry in a pinned IDL or schema, with no collision.

  2. Live code rebuilt by POA

    Established

    POA rebuilt a source commit and its hash equals the on-chain executable.

  3. Report names the handler file

    Established

    A published audit report's scope covers the file that implements this instruction.

  4. Reviewed commit printed

    Established

    That report prints the scope and the exact commit it reviewed.

  5. Reviewed code is the live code

    Known difference

    The reviewed commit and the rebuilt live commit hold the same program code.

Every link must hold before POA says Matched. A missing link is not a failure, and never an approval.

Reasons

  1. Program snapshot at slot 471652463: executable, RPC agree, hash 1a71bd2229fe….
  2. Decoded by anchor-sighash-derived a1808ff5abc7c206.
  3. Handler programs/klend/src/handlers/handler_borrow_obligation_liquidity.rs#L41 (handler_borrow_obligation_liquidity::process_v2).
  4. Only partly reviewed per ackee-2025-fuzz (Fuzz testing only; the report says manual code review was not performed (p.11)); these reports give neither MATCHED nor CHANGED for this instruction.
  5. Handler file is under the printed scope of certora-2025-02-fv, offside-1.13.0-borrow-orders, offside-1.14.0-withdraw-queue.
  6. Live source 77e81854 established by POA's independent build.
  7. Live commit 77e81854 is not the reviewed commit and no recorded diff shows the crate unchanged (certora-2025-02-fv (5af6cfc: handler files changed, f3b2ce1: handler files changed); offside-1.13.0-borrow-orders (17 commits without a usable recorded diff); offside-1.14.0-withdraw-queue (10 commits without a usable recorded diff)).
  8. CHANGED: between certora-2025-02-fv's reviewed commit 5af6cfc and live 77e81854 the handler's traced files changed: programs/klend/src/handlers/handler_borrow_obligation_liquidity.rs (M +37 -18), programs/klend/src/handlers/handler_refresh_obligation_farms_for_reserve.rs (M +26 -7), programs/klend/src/lending_market/lending_checks.rs (M +576 -125), programs/klend/src/lending_market/lending_operations.rs (M +2208 -822), programs/klend/src/state/lending_market.rs (M +402 -28), programs/klend/src/state/obligation.rs (M +1370 -136), programs/klend/src/state/referral.rs (M +33 -2), programs/klend/src/state/reserve.rs (M +1474 -286), programs/klend/src/utils/macros.rs (M +49 -75), programs/klend/src/utils/refresh_ix_utils.rs (M +33 -8), programs/klend/src/utils/token_transfer.rs (M +94 -13).

What would be needed for a stronger verdict

  1. A source diff from the reviewed commit to the live commit showing no change under the program crate.

Checks

Decoded
Yes
Handler located
Yes
Handler in report-named files
Yes
Review scope established
Yes
Reviewed commit known
Yes
Live source rebuilt by POA
Yes
Live source equals reviewed
No
Handler changed since review
Yes
Program crate changed since review
Yes
Program immutable
No
Evidence fresh
Yes

Discriminator and decoding

Discriminator
a1808ff5abc7c206
Method
Derived Anchor sighash
IDL SHA-256
838837c76e4454563f206461411259c6573daddb1e269dee8cc94347ccfdc367
Collisions
None

Arguments

NameType
liquidityAmountu64

Accounts

Signer and writable flags from the interface definition.

AccountFlagsFixed addressNotes
borrowAccounts.ownerSigner
borrowAccounts.obligationWritable
borrowAccounts.lendingMarketRead-only
borrowAccounts.lendingMarketAuthorityRead-only
borrowAccounts.borrowReserveWritable
borrowAccounts.borrowReserveLiquidityMintRead-only
borrowAccounts.reserveSourceLiquidityWritable
borrowAccounts.borrowReserveLiquidityFeeReceiverWritable
borrowAccounts.userDestinationLiquidityWritable
borrowAccounts.referrerTokenState (optional)Writable
borrowAccounts.tokenProgramRead-only
borrowAccounts.instructionSysvarAccountRead-only
farmsAccounts.obligationFarmUserState (optional)Writable
farmsAccounts.reserveFarmState (optional)Writable
farmsProgramRead-only

Handler source

Audit relations

How each report relates to this instruction's handler file.

AuditorRelationReviewed commitScope confidence
Sec3Security Assessment Report: Kamino Lending Program (opens in a new tab)Program covered, no paths namedc183a70Printed in the report
CertoraKamino Lending: formal verification and manual review (two engagements, Nov 2024 and Feb 2025) (opens in a new tab)Handler file is in the named scope5af6cfcPrinted in the report
CertoraKamino Lending 1.13.0: borrow orders, debt maturity and debt term (manual review) (opens in a new tab)Program covered, no paths namedNot establishedPrinted in the report
CertoraKamino Lending 1.13.1: PR630 and PR656 (manual review) (opens in a new tab)Program covered, no paths namedNot establishedPrinted in the report
CertoraKamino Lending 1.14.0: withdraw queue and related PRs (manual review) (opens in a new tab)Program covered, no paths namedf26fb79Printed in the report
CertoraKamino Lending 1.14.1: PR736 minimum values (manual review) (opens in a new tab)Program covered, no paths named41232cePrinted in the report
CertoraKamino Lending 1.15.0: PR627, PR628, PR632, PR704 (manual review) (opens in a new tab)Program covered, no paths named6b893a5Printed in the report
CertoraKamino Lending 1.16.0: fixed-term auto-rollover and throttled term-based liquidations (opens in a new tab)Program covered, no paths named11a9d17Printed in the report
CertoraKamino Lending 1.17.0: early repay penalty, clone_reserve_config, cancel withdraw ticket (opens in a new tab)Program covered, no paths nameda84169bPrinted in the report
OtterSecKamino Finance kamino-lending audit (2023) (opens in a new tab)Program covered, no paths named88dfca4Printed in the report
OtterSecKamino Borrow Orders Security Assessment (opens in a new tab)Program covered, no paths named42ea028Inferred
OtterSecKamino Klend Security Assessment: PR#654 flash loan fee disable marker (opens in a new tab)Program covered, no paths namedNot establishedInferred
OtterSecKamino Conditional Liquidity Security Assessment (opens in a new tab)Program covered, no paths namedNot establishedInferred
OtterSecKamino Klend Security Assessment (releases 1.16.0 and 1.17.0) (opens in a new tab)Program covered, no paths namedNot establishedInferred
OtterSecK-Lend Formal Verification Security Assessment (opens in a new tab)Program covered, no paths namedNot establishedInferred
Offside LabsKamino Lending BorrowOrder Smart Contract Security Assessment (opens in a new tab)Handler file is in the named scopeb4bbebcPrinted in the report
Offside LabsKamino Lending Emergency Council Smart Contract Security Assessment (opens in a new tab)Handler file is outside the named scope43fe383Printed in the report
Offside LabsKamino Lending WithdrawQueue Smart Contract Security Assessment (opens in a new tab)Handler file is in the named scope8f81f96Printed in the report
Ackee Blockchain SecurityKamino Lending audit report (revision 1.1, fix review) (opens in a new tab)Program covered, no paths namedc61808aPrinted in the report
Ackee Blockchain SecurityKamino Lend fuzz tests (revisions 1.0 to 2.1) (opens in a new tab)Program covered, no paths named4c58439Printed in the report
Ronny Xing (RonnyX)Security Assessment Report: Kamino Lending (July 2023) (opens in a new tab)Handler file is outside the named scope419de5cPrinted in the report

Changed files since review

Files changed between the reviewed commit and the live source, as recorded.

FileStatusAddedRemoved
programs/klend/src/handlers/handler_borrow_obligation_liquidity.rsmodified9440
programs/klend/src/handlers/handler_refresh_obligation_farms_for_reserve.rsmodified7331
programs/klend/src/lending_market/farms_ixs.rsmodified89
programs/klend/src/lending_market/lending_checks.rsmodified610151
programs/klend/src/lending_market/lending_operations.rsmodified2,424892
programs/klend/src/state/lending_market.rsmodified40729
programs/klend/src/state/obligation.rsmodified1,481221
programs/klend/src/state/referral.rsmodified332
programs/klend/src/state/reserve.rsmodified1,592314
programs/klend/src/utils/macros.rsmodified7074
programs/klend/src/utils/refresh_ix_utils.rsmodified7215
programs/klend/src/utils/token_transfer.rsmodified12011

Call trees

The static tree comes from the handler source. The observed tree comes from a finalized transaction. They are separate evidence and are not merged.

Instruction
The instruction itself, with its own verdict.
Static
A source file read at the handler map's pinned commit.
Observed
A call seen in a finalized mainnet transaction.
Inferred
A call read from the handler source, not observed on chain.

Static, from source at 77e8185

  • Signer
    • InstructionChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • InferredUnknown
      • InferredUnknown
      • InferredUnknown

Observed in transaction kzSzvhHem7… at slot 471,507,325

  • Signer
    • InstructionUnknown
    • InstructionUnknown
    • InstructionChanged
    • InstructionChanged
    • InstructionChanged
    • InstructionChanged
    • InstructionChanged
    • InstructionChanged
    • InstructionChanged
    • InstructionChanged
    • InstructionChanged
      • ObservedUnknown
    • InstructionUnknown
    • InstructionUnknown

Current deployment predates this transaction. Deployment slot 461,744,249, transaction slot 471,507,325, snapshot slot 471,652,463.

Open on Solana Explorer (opens in a new tab)

Transactions

Each curated transaction that calls this instruction, with what is known about the code that ran.

  1. 01

    Transaction at slot 471,507,325

    Current deployment predates this transaction. Deployment slot 461,744,249, transaction slot 471,507,325, snapshot slot 471,652,463.

    Signature
    kzSzvhHem7amVpbDk5ft35rAJsQ5FCGALc2z2cr3raqGZ6QFW98Zxiu2vnRo7eZrtSKqd6b9ApDWPq6VnG8aZnR
    Slot
    471,507,325
    Block time
    2026-11-19 22:44 UTC
    Status
    Succeeded
    Fee
    59,855 lamports
    Compute units
    402,435
    Message version
    0
    RPC response SHA-256
    89a00e6afda5478b7078336508f14a9bc8aa3671bcc5b3d2ff5bfe93fd3f565b

    Open on Solana Explorer (opens in a new tab)