deposit_reserve_liquidity_and_obligation_collateral
Kamino Lending (KLend)
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
Instruction decoded
Established
The instruction bytes match one entry in a pinned IDL or schema, with no collision.
Live code rebuilt by POA
Established
POA rebuilt a source commit and its hash equals the on-chain executable.
Report names the handler file
Established
A published audit report's scope covers the file that implements this instruction.
Reviewed commit printed
Established
That report prints the scope and the exact commit it reviewed.
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
- Program snapshot at slot 471652463: executable, RPC agree, hash 1a71bd2229fe….
- Decoded by anchor-sighash-derived 81c70402de271a2e.
- Handler programs/klend/src/handlers/handler_deposit_reserve_liquidity_and_obligation_collateral.rs#L24 (handler_deposit_reserve_liquidity_and_obligation_collateral::process_v1).
- 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.
- Handler file is under the printed scope of certora-2025-02-fv, offside-1.13.0-borrow-orders, offside-1.14.0-withdraw-queue.
- Live source 77e81854 established by POA's independent build.
- 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)).
- CHANGED: between certora-2025-02-fv's reviewed commit 5af6cfc and live 77e81854 the handler's traced files changed: programs/klend/src/handlers/handler_deposit_reserve_liquidity_and_obligation_collateral.rs (M +38 -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/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/spltoken.rs (M +61 -0), programs/klend/src/utils/token_transfer.rs (M +94 -13).
What would be needed for a stronger verdict
- 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
- 81c70402de271a2e
- Method
- Derived Anchor sighash
- IDL SHA-256
- 838837c76e4454563f206461411259c6573daddb1e269dee8cc94347ccfdc367
- Collisions
- None
Arguments
| Name | Type |
|---|---|
| liquidityAmount | u64 |
Accounts
Signer and writable flags from the interface definition.
| Account | Flags | Fixed address | Notes |
|---|---|---|---|
| owner | SignerWritable | ||
| obligation | Writable | ||
| lendingMarket | Read-only | ||
| lendingMarketAuthority | Read-only | ||
| reserve | Writable | ||
| reserveLiquidityMint | Read-only | ||
| reserveLiquiditySupply | Writable | ||
| reserveCollateralMint | Writable | ||
| reserveDestinationDepositCollateral | Writable | ||
| userSourceLiquidity | Writable | ||
| placeholderUserDestinationCollateral (optional) | Read-only | ||
| collateralTokenProgram | Read-only | ||
| liquidityTokenProgram | Read-only | ||
| instructionSysvarAccount | Read-only |
Handler source
- Function
- handler_deposit_reserve_liquidity_and_obligation_collateral::process_v1
- File
- programs/klend/src/handlers/handler_deposit_reserve_liquidity_and_obligation_collateral.rs · lines 24–39
- At commit
- 77e81854909ab7ffea3a2e898b2554d96e07daac
- Mapping
- Anchor program module
Related files
- programs/klend/src/handlers/handler_deposit_reserve_liquidity_and_obligation_collateral.rs (opens in a new tab)
- programs/klend/src/lending_market/lending_operations.rs (opens in a new tab)
- programs/klend/src/lending_market/lending_checks.rs (opens in a new tab)
- programs/klend/src/utils/token_transfer.rs (opens in a new tab)
- programs/klend/src/utils/macros.rs (opens in a new tab)
- programs/klend/src/utils/refresh_ix_utils.rs (opens in a new tab)
- programs/klend/src/state/reserve.rs (opens in a new tab)
- programs/klend/src/state/obligation.rs (opens in a new tab)
- programs/klend/src/state/lending_market.rs (opens in a new tab)
- programs/klend/src/utils/spltoken.rs (opens in a new tab)
Audit relations
How each report relates to this instruction's handler file.
Changed files since review
Files changed between the reviewed commit and the live source, as recorded.
| File | Status | Added | Removed |
|---|---|---|---|
| programs/klend/src/handlers/handler_deposit_reserve_liquidity_and_obligation_collateral.rs | modified | 109 | 33 |
| programs/klend/src/lending_market/lending_checks.rs | modified | 610 | 151 |
| programs/klend/src/lending_market/lending_operations.rs | modified | 2,424 | 892 |
| programs/klend/src/state/lending_market.rs | modified | 407 | 29 |
| programs/klend/src/state/obligation.rs | modified | 1,481 | 221 |
| programs/klend/src/state/reserve.rs | modified | 1,592 | 314 |
| programs/klend/src/utils/macros.rs | modified | 70 | 74 |
| programs/klend/src/utils/refresh_ix_utils.rs | modified | 72 | 15 |
| programs/klend/src/utils/spltoken.rs | modified | 61 | 0 |
| programs/klend/src/utils/token_transfer.rs | modified | 120 | 11 |
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
- InferredUnknown
- InferredUnknown
No curated transaction calls this instruction.
Transactions
Each curated transaction that calls this instruction, with what is known about the code that ran.
No curated transaction calls this instruction.