rollover_fixed_term_borrow
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 551e9be1e0ba8d94.
- Handler programs/klend/src/handlers/handler_rollover_fixed_term_borrow.rs#L15 (handler_rollover_fixed_term_borrow::process).
- 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_refresh_obligation_farms_for_reserve.rs (M +26 -7), programs/klend/src/handlers/handler_rollover_fixed_term_borrow.rs (A +254 -0), 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/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
- 551e9be1e0ba8d94
- Method
- Derived Anchor sighash
- IDL SHA-256
- 838837c76e4454563f206461411259c6573daddb1e269dee8cc94347ccfdc367
- Collisions
- None
Arguments
No arguments.
Accounts
Signer and writable flags from the interface definition.
| Account | Flags | Fixed address | Notes |
|---|---|---|---|
| rolloverAccounts.payer | Signer | ||
| rolloverAccounts.obligation | Writable | The obligation with a borrow to be rolled over (or migrated). | |
| rolloverAccounts.lendingMarket | Read-only | The [Self::obligation]'s market, needed for validations against the market-wide configuration. | |
| rolloverAccounts.lendingMarketAuthority | Read-only | The [Self::lending_market]'s authority, needed to transfer the newly-borrowed funds out of the [Self::reserve_source_liquidity]. | |
| rolloverAccounts.sourceBorrowReserve | Writable | The reserve used by the existing [Self::obligation]'s borrow that needs to rollover from. | |
| rolloverAccounts.targetBorrowReserve | Writable | The reserve to rollover the borrow into - possibly (but not necessarily) the same as [Self::source_borrow_reserve]'s (but definitely of the same liquidity mint). | |
| rolloverAccounts.liquidityMint | Read-only | The mint of [Self::source_borrow_reserve] and [Self::target_borrow_reserve], needed to transfer funds between them. | |
| rolloverAccounts.sourceBorrowReserveLiquidity | Writable | The vault of [Self::source_borrow_reserve], from which the funds are transferred. | |
| rolloverAccounts.targetBorrowReserveLiquidity | Writable | The vault of [Self::target_borrow_reserve], from which the funds are transferred. | |
| rolloverAccounts.tokenProgram | Read-only | The token program of [Self::liquidity_mint] - needed to execute the transfer. | |
| sourceFarmsAccounts.obligationFarmUserState (optional) | Writable | ||
| sourceFarmsAccounts.reserveFarmState (optional) | Writable | ||
| targetFarmsAccounts.obligationFarmUserState (optional) | Writable | ||
| targetFarmsAccounts.reserveFarmState (optional) | Writable | ||
| farmsProgram | Read-only |
Handler source
- Function
- handler_rollover_fixed_term_borrow::process
- File
- programs/klend/src/handlers/handler_rollover_fixed_term_borrow.rs · lines 15–37
- At commit
- 77e81854909ab7ffea3a2e898b2554d96e07daac
- Mapping
- Anchor program module
Related files
- programs/klend/src/handlers/handler_rollover_fixed_term_borrow.rs (opens in a new tab)
- programs/klend/src/handlers/handler_refresh_obligation_farms_for_reserve.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/lending_market/farms_ixs.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_refresh_obligation_farms_for_reserve.rs | modified | 73 | 31 |
| programs/klend/src/handlers/handler_rollover_fixed_term_borrow.rs | added | 254 | 0 |
| programs/klend/src/lending_market/farms_ixs.rs | modified | 8 | 9 |
| 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/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
- 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.