Skip to content
Business logic Audit finding Intermediate

Cap and ceiling setters call the router with the wrong ABI

The configurator contract calls the router's cap and ceiling setters with an extra leading caller argument, but the router expects only asset and value. As a result, administrative attempts to change supply caps, borrow caps, or debt ceilings fail deterministically during argument handling.

v12 Follow with AndreyL1231, heykerme and 9 others

Originally disclosed on Code4rena

Submitted by v12, also found by AndreyL1231, heykerme, KarlGoodGuy, KingsleyCaesar, NoesaaDecodes, Oxhelm, oxwhite, pepoc, qed, sam-wiz, and yonko

Found by V12

  • contracts/pool-configurator/src/reserve.rs #L474
  • contracts/pool-configurator/src/reserve.rs #L510
  • contracts/pool-configurator/src/reserve.rs #L546
  • contracts/kinetic-router/src/reserve.rs #L149
  • contracts/kinetic-router/src/reserve.rs #L176
  • contracts/kinetic-router/src/storage.rs #L238

Targets

  • PoolConfiguratorContract::setsupplycap
  • PoolConfiguratorContract::setborrowcap
  • PoolConfiguratorContract::setdebtceiling
  • KineticRouter::setreservesupply_cap
  • KineticRouter::setreserveborrow_cap
  • KineticRouter::setreservedebt_ceiling

Affected Locations

  • PoolConfiguratorContract.setsupplycap: The configurator forwards [caller, asset, value] when setting the supply cap, even though the router entrypoint expects only (asset, value).
  • PoolConfiguratorContract.setborrowcap: The configurator forwards [caller, asset, borrow_cap] to the router borrow-cap setter instead of the router’s real two-argument ABI.
  • PoolConfiguratorContract.setdebtceiling: The configurator forwards [caller, asset, value] when setting the debt ceiling, creating the same ABI mismatch as the other cap setters.
  • KineticRouter.setreservesupply_cap: This router entrypoint is defined for (asset, cap) and is the target whose signature the configurator call does not match.
  • KineticRouter.setreserveborrow_cap: This router entrypoint is defined for (asset, borrow_cap) and is invoked with an extra leading caller argument by the configurator.
  • KineticRouter.setreservedebt_ceiling: This router entrypoint is defined for (asset, debt_ceiling) and likewise receives a malformed argument list from the configurator.

Description

set_supply_cap, set_borrow_cap, and set_debt_ceiling in the configurator all build raw cross-contract calls with an extra leading caller argument. The corresponding router entrypoints accept only (asset, value) and perform admin authorization internally, so the configurator is speaking the wrong ABI. As a result, these administrative paths do not update the requested parameter and instead deterministically fail during Soroban argument handling. This breaks the documented configurator workflow for changing supply caps, borrow caps, and debt ceilings. The borrow-cap path is especially important because operators are instructed to use it as part of emergency risk response, and the issue was partially masked by a test mock that copied the broken signature.

Root Cause

The configurator manually invokes set_reserve_supply_cap, set_reserve_borrow_cap, and set_reserve_debt_ceiling with [caller, asset, value] even though those router functions expect only (asset, value).

Impact

Administrators cannot use the standard configurator interface to tighten or relax supply caps, borrow caps, or debt ceilings. During fast-moving market conditions, this can delay risk mitigation until operators discover and execute direct router calls or another workaround.

Proof of Concept

See this gist for full Proof of Concept


The original report as published on Code4rena, by v12. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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

The configurator manually invokes the router's cap and ceiling setters with an extra leading caller argument, while those router functions expect only asset and value.

Impact

Administrators cannot use the standard configurator interface to tighten or relax supply caps, borrow caps, or debt ceilings, which could delay risk mitigation during fast-moving market conditions.

What the attacker needed

Admin access to configurator; none

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.

Smart contracts talk to each other by sending messages with a fixed shape, called an ABI. Here the configurator sent three pieces of information where the router expected two, so the router rejected every attempt to change important risk limits. Administrators could not adjust those limits through the normal tool.

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.

More by v12

View all

37 more disclosed reports, best first.

More from K2

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.