`SimplePriceManager.onUpdate()` lack of forward execution fee leads dependent functions to revert
The SimplePriceManager.onUpdate() function calls gateway.withBatch() without forwarding the required native token execution fee, causing the batch to revert with NotEnoughGas when unpaidMode is false. This leads to a denial of service for functions like NAVManager.updateHoldingValue() and OracleValuation.setPrice() that rely on onUpdate().
Cybrid Follow with Tenalia-Audits, Ziusz and 2 others
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-10-centrifuge-protocol-v3-1-audit-judging/issues/359
Found by
Cybrid, Tenalia-Audits, Ziusz, bbl4de, harry
Summary
SimplePriceManager.onUpdate() wraps its work in gateway.withBatch() but does not forward any native token as the execution fee. In practice, partial path that relies on onUpdate() will consistently revert.
Root Cause
Gateway.withBatch() needs native token to cover the adapter’s estimated fee. However, SimplePriceManager.onUpdate() is not payable and forwards no value to withBatch(), so the batch runs with zero fuel:
function onUpdate(PoolId poolId, ShareClassId scId, uint16 centrifugeId, uint128 netAssetValue) public virtual {
require(msg.sender == navUpdater, NotAuthorized());
require(scId.index() == 1, InvalidShareClass());
gateway.withBatch(
abi.encodeWithSelector(
SimplePriceManager.onUpdateCallback.selector, poolId, scId, centrifugeId, netAssetValue
),
address(0)
);
}
When unpaidMode is false, the lack of execution fee causes withBatch() to revert. In this case, any function that relies on onUpdate() will DoS.
Internal Pre-conditions
None
External Pre-conditions
None
Attack Path
When NAVManager.updateHoldingValuation() or OracleValuation.setPrice() executes, they trigger onUpdate().
Inside withBatch(), it first runs onUpdateCallback() and buffers messages:
for (uint256 i; i < networks_.length; i++) {
hub.notifySharePrice(poolId, scId, networks_[i], address(0));
}
When withBatch() completes, it flushes the batch via _endBatching(). With msg.value == 0 and callbackValue == 0, _endBatching() passes 0 as fuel:
uint256 cost = _endBatching(msg.value - callbackValue, refund);
So inside _endBatching(), fuel - cost becomes 0 and is passed as the parameter to _send():
https://github.com/sherlock-audit/2025-10-centrifuge-protocol-v3-1-audit/blob/main/protocol/src/core/messaging/Gateway.sol#L270
cost += _send(centrifugeId, batch, gasLimit, refund, fuel - cost);
In _send(), it cannot meet either fuel >= cost or unpaidMode (which is still false), so it reverts with NotEnoughGas():
function _send(uint16 centrifugeId, bytes memory batch, uint128 batchGasLimit, address refund, uint256 fuel)
internal
returns (uint256 cost)
{
PoolId adapterPoolId = processor.messagePoolId(batch);
require(!isOutgoingBlocked[centrifugeId][adapterPoolId], OutgoingBlocked());
cost = adapter.estimate(centrifugeId, batch, batchGasLimit);
if (fuel >= cost) {
adapter.send{value: cost}(centrifugeId, batch, batchGasLimit, refund);
} else if (unpaidMode) {
_addUnpaidBatch(centrifugeId, batch, batchGasLimit);
cost = 0;
} else {
@> revert NotEnoughGas();
}
}
Impact
Directly calling these core functions will revert, resulting in a DoS:
NAVManager.updateHoldingValue()OracleValuation.setPrice()
As a result, functionality is broken for NAV and price propagation that relies on this update path.
PoC
No response
Mitigation
Make onUpdate() payable and forward the exact fee to withBatch():
+ function onUpdate(PoolId poolId, ShareClassId scId, uint16 centrifugeId, uint128 netAssetValue) public payable virtual
- function onUpdate(PoolId poolId, ShareClassId scId, uint16 centrifugeId, uint128 netAssetValue) public virtual {
require(msg.sender == navUpdater, NotAuthorized());
require(scId.index() == 1, InvalidShareClass());
+ gateway.withBatch{value: msg.value}(
- gateway.withBatch(
abi.encodeWithSelector(
SimplePriceManager.onUpdateCallback.selector, poolId, scId, centrifugeId, netAssetValue
),
address(0)
);
}
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/centrifuge/protocol-internal/pull/65
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 onUpdate() function is not marked payable and does not forward any native token value to gateway.withBatch(), so the gateway receives zero fuel and reverts when unpaidMode is false.
Impact
Directly calling NAVManager.updateHoldingValue() or OracleValuation.setPrice() will revert, causing a denial of service for NAV and price propagation that relies on this update path.
What the attacker needed
UnpaidMode is false; caller is navUpdater or authorized
The fix
The protocol team fixed this issue by making onUpdate() payable and forwarding the exact fee to withBatch().
How it was found
- Call NAVManager.updateHoldingValue() or OracleValuation.setPrice(), which triggers onUpdate().
- onUpdate() calls gateway.withBatch() without sending any native token as execution fee.
- Inside withBatch(), the batch is processed and _endBatching() is called with msg.value == 0.
- _endBatching() passes fuel - cost (which is 0) to _send().
- _send() checks if fuel >= cost or unpaidMode is true; both are false, so it reverts with NotEnoughGas().
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.
This report describes a bug where a smart contract function tries to send a message through a gateway but forgets to include the fee needed to pay for the message delivery. Because the fee is missing, the gateway refuses to send the message and the whole operation fails, blocking other important functions that depend on it.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.