Reserve factor changes do not affect treasury accrual until an unrelated rate-recalc path runs
Changing the reserve factor only stores the new configuration without checkpointing the old accrual interval or recomputing the liquidity rate. As a result, treasury collection keeps accruing with the stale supplier/protocol split until an unrelated rate-recalculation action runs, causing deterministic under-collection of protocol reserves after a factor increase.
ht111111 Follow with 0xGutzzz, abdelhaq16 and 13 others
Originally disclosed on Code4rena
Submitted by ht111111, also found by 0xGutzzz, abdelhaq16, Agontuk, BigLizzyaudit0x, ChainSentry, CryFlowerBB, fuzious, Jhounx, joeza, maigadoh, PolarizedLight, qed, rare_one, ryan97singh, and ZanyBonzy
contracts/pool-configurator/src/reserve.rs#L385-L427contracts/kinetic-router/src/reserve.rs#L330-L346contracts/kinetic-router/src/calculation.rs#L443-L494contracts/kinetic-router/src/treasury.rs#L5-L18
K2 documents reserve-factor governance as affecting future interest accrual, but the setter only stores the new configuration. It does not close the old accrual interval, it does not recompute current_liquidity_rate, and it does not install a new treasury split for the post-change interval.
PoolConfigurator.set_reserve_factor() loads the current reserve configuration, changes the packed reserve_factor, and forwards that bitmap to the router. The router then overwrites reserve_data.configuration in storage and returns. No index checkpoint or rate recalculation happens in either contract.
That matters because K2’s reserve state is lazy:
update_state()accrues the entire elapsed interval using the storedcurrent_liquidity_rateandcurrent_variable_borrow_rate;- only later
update_interest_rates_and_store()paths install fresh rates; and collect_protocol_reserves()callsupdate_state()but does not callupdate_interest_rates_and_store().
So after governance raises reserve_factor, the treasury path still accrues the entire stale window with the old supplier/protocol split until some unrelated rate-recalc action happens first, such as supply, withdraw, borrow, repay, liquidation, or swap.
The PoC proves the timing gap with two otherwise equivalent scenarios:
- both scenarios create the same reserve utilization and then raise
reserve_factorfrom 10% to 90%; - in the stale path, no later user action is performed before
collect_protocol_reserves(); - in the control path, a zero-net user touch (
supply(1)thenwithdraw(1)in the same timestamp) forcesupdate_interest_rates_and_store()to install the new factor before time continues.
After the same post-change interval elapses:
- the stale path still has the old
current_liquidity_rate; collect_protocol_reserves()still uses that stale rate; and- the treasury collects strictly less than the checkpointed control path.
This is not a public theft primitive and should not be framed as a generic lazy-accrual complaint. The confirmed impact is narrower and concrete: governance can change the reserve factor, but K2 continues using the old treasury split for subsequent elapsed time until an unrelated rate-recalc path happens to run.
That creates deterministic under-collection of protocol reserves after factor increases. The PoC is intentionally scoped to that treasury-facing branch.
Recommended mitigation steps
When changing reserve economics:
- load the reserve;
- checkpoint the old interval at the setter timestamp;
- store the new configuration; and
- immediately recompute and persist
current_liquidity_rate/current_variable_borrow_rateunder the new parameters.
At minimum, reserve-configuration setters and treasury collection should not leave governance-applied factors dormant behind an unrelated future user action.
Proof of Concept
See original finding for full Proof of Concept
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the reserve-factor setter only overwrites the stored configuration and never checkpoints the elapsed interval or recomputes the current liquidity and borrow rates, so lazy accrual keeps using stale rates.
Impact
The treasury deterministically under-collects protocol reserves after a factor increase until an unrelated rate-recalc action runs; the report states this is not a public theft primitive.
What the attacker needed
Governance raises the reserve factor; no rate-recalc action runs afterwards; treasury collection occurs first
The fix
The setter should checkpoint the old interval at the setter timestamp, store the new configuration, and immediately recompute and persist the current liquidity and borrow rates under the new parameters.
How it was found
- Create the same reserve utilisation in two scenarios and raise the reserve factor from 10% to 90%.
- In the stale path, perform no later user action before calling collect_protocol_reserves().
- In the control path, do a zero-net supply then withdraw in the same timestamp to force a rate recalculation.
- Let the same post-change interval elapse and compare what the treasury collects in each path.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A reserve factor decides how much of the interest borrowers pay goes to the protocol treasury rather than to suppliers. Here, when governance raises that factor, the system saves the new number but keeps using the old interest rate until some unrelated user action happens to refresh it. So the treasury quietly receives less than it should for a while, and the report shows this with two side-by-side test scenarios.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.