ChainlinkOracle cannot pay Data Streams verification fees, causing oracle updates to fail
ChainlinkOracle hardcodes the Data Streams verification fee to zero and never implements an ERC20 fee payment path, so any pusher submitting an otherwise valid paid report will have VerifierProxy.verify() revert before _store() refreshes the feed. This causes Chainlink-backed oracle updates to fail on paid Data Streams deployments, breaking swaps that depend on the feed once the previous report becomes stale.
0xMehediSec Follow with 0xShoonya, 0xZHD_S and 39 others
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2026-07-metric-judging/issues/141
Found by
0xMehediSec, 0xShoonya, 0xZHD_S, 0xapple, AskSecurity, Bchen, Brianite, Civitasmass, Dheeraj_Shah, GPT-wrapper, Ironsidesec, Kvar, MaloneGod, Saai, TradingViews, WebIIISecurity, Wojack, Yahaya-Salisu, ZeroTrust, adshao, anchabadze, cnaj_xyz, emjourney, farismaulana, hunraj, iam0ti, johnnyyy, jokerbuena, kamran, kehsihba, nazarhero, oxtensor-01, pkqs90, sahuang, serial-coder, shayh88, silverhero, techjourney, tjonair, y4y, yaohao159258, zpan
Summary
ChainlinkOracle hardcodes the Data Streams verification payment to zero and never implements an ERC20 fee payment path, which will cause Chainlink-backed oracle updates to fail on paid Data Streams deployments as any pusher submitting an otherwise valid paid report will have VerifierProxy.verify() revert before _store() refreshes the feed.
Root Cause
In ChainlinkOracle.sol#L27-L29, the verification fee is fixed to 0 wei even though the comment says the per-report verification fee is paid from the contract balance.
In ChainlinkOracle.sol#L45-L59, the contract stores a configured feeToken, but no code ever approves or transfers that token for verifier billing.
In ChainlinkOracle.sol#L78-L82, _verifyReport() always calls:
return verifierProxy.verify{value: VERIFICATION_FEE}(fullReport, abi.encode(feeToken));
Therefore every verification call sends 0 native tokens and only passes the fee token address as billing metadata. The local Data Streams interface confirms that parameterPayload is the ABI-encoded billing fee token and that report schemas carry nativeFee and linkFee values (IDataStreams.sol#L10-L17, IDataStreams.sol#L24-L34, IDataStreams.sol#L37-L46, IDataStreams.sol#L49-L59).
The provided network config uses nonzero Chainlink fee-token addresses, for example Base networks.json#L509-L512 and Ethereum networks.json#L605-L608.
Internal Pre-conditions
- A
ChainlinkOracleis deployed with a real Chainlink Data StreamsVerifierProxy. feeTokenis configured to the network billing token, as in the provided Base or Ethereum config.- A protected price provider or pool depends on this Chainlink oracle feed for swaps.
- The previous stored report eventually needs to be refreshed before the provider staleness window expires.
External Pre-conditions
- The Chainlink Data Streams verifier charges a nonzero native or token fee for the report.
- A pusher submits an otherwise valid DON-signed report through
updateReport()orupdateReports().
Attack Path
- A valid Data Streams report becomes available and should refresh the Chainlink-backed feed.
- The pusher calls
ChainlinkOracle.updateReport(fullReport). _verifyReport()callsVerifierProxy.verify()withmsg.value == 0andabi.encode(feeToken).- For native-fee billing, the verifier receives no native fee.
- For token-fee billing, the verifier is called by
ChainlinkOracle, butChainlinkOraclehas no ERC20 allowance/payment path for the fee token. VerifierProxy.verify()reverts before returning verified report data._store()is never reached, so the feed is not refreshed.- Once the previous report exceeds
maxTimeDelta, Chainlink-backed providers fail closed and swaps depending on them stop working.
Impact
Users cannot swap through pools whose active price provider depends on the paid Chainlink Data Streams feed once the previously stored report becomes stale. This breaks core oracle update and swap functionality for the affected Chainlink-backed deployment. It satisfies the contest Medium category because a core contract function becomes unusable under the intended paid Data Streams configuration.
PoC
The following Foundry test demonstrates both native-fee and token-fee failures against the production ChainlinkOracle logic. The verifier mock models the relevant Data Streams billing behavior: it accepts the same report only if the caller pays the required native fee or has approved the required token fee. ChainlinkOracle fails both cases because it always sends zero native value and never approves/transfers the fee token.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
import "forge-std/Test.sol";
import "../contracts/oracles/providers/ChainlinkOracle.sol";
import "../contracts/interfaces/IDataStreams.sol";
contract FeeToken {
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
function mint(address to, uint256 amount) external {
balanceOf[to] += amount;
}
function approve(address spender, uint256 amount) external returns (bool) {
allowance[msg.sender][spender] = amount;
return true;
}
function transferFrom(address from, address to, uint256 amount) external returns (bool) {
require(balanceOf[from] >= amount, "balance");
require(allowance[from][msg.sender] >= amount, "allowance");
allowance[from][msg.sender] -= amount;
balanceOf[from] -= amount;
balanceOf[to] += amount;
return true;
}
}
contract PaidVerifier {
FeeToken public immutable token;
bytes public response;
uint256 public nativeFee;
uint256 public tokenFee;
constructor(FeeToken token_) {
token = token_;
}
function setFees(uint256 nativeFee_, uint256 tokenFee_) external {
nativeFee = nativeFee_;
tokenFee = tokenFee_;
}
function setResponse(bytes memory response_) external {
response = response_;
}
function verify(bytes calldata, bytes calldata parameterPayload)
external
payable
returns (bytes memory)
{
address feeToken = abi.decode(parameterPayload, (address));
if (nativeFee != 0) {
require(msg.value == nativeFee, "native fee not paid");
}
if (tokenFee != 0) {
require(feeToken == address(token), "wrong fee token");
require(token.transferFrom(msg.sender, address(this), tokenFee), "token fee not paid");
}
return response;
}
}
contract ChainlinkOracleFeePaymentPoC is Test {
bytes32 constant FEED_ID = bytes32(uint256(3) << 240);
FeeToken feeToken;
PaidVerifier verifier;
ChainlinkOracle oracle;
function setUp() public {
feeToken = new FeeToken();
verifier = new PaidVerifier(feeToken);
oracle = new ChainlinkOracle(address(this), 60, address(verifier), address(feeToken));
ReportV3 memory report = ReportV3({
feedId: FEED_ID,
validFromTimestamp: uint32(block.timestamp),
observationsTimestamp: uint32(block.timestamp),
nativeFee: 1 wei,
linkFee: 1e18,
expiresAt: uint32(block.timestamp + 1 hours),
price: 1000e18,
bid: 999e18,
ask: 1001e18
});
verifier.setResponse(abi.encode(report));
}
function testTokenFeeIsNeverPaid() public {
feeToken.mint(address(oracle), 1e18);
verifier.setFees(0, 1e18);
vm.expectRevert("allowance");
oracle.updateReport(hex"1234");
}
function testNativeFeeIsNeverForwarded() public {
vm.deal(address(oracle), 1 ether);
verifier.setFees(1 wei, 0);
vm.expectRevert("native fee not paid");
oracle.updateReport(hex"1234");
}
}
Mitigation
Implement the Data Streams billing path explicitly. For native-fee billing, quote or decode the required per-report fee and forward it to VerifierProxy.verify(); batch updates must account for every report. For token-fee billing, fund the oracle and approve/pay the actual Chainlink fee manager or verifier spender with safe ERC20 handling before verification. Alternatively, make the pusher supply the exact fee and revert if the verifier fee cannot be paid.
Discussion
sherlock-admin4
The protocol team fixed this issue in the following PRs/commits: https://github.com/Oracle-Based-Pool/smart-contracts-poc/commit/fb3e4e407bf0bf535d418c68a7480e965e5f5e8c
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 contract hardcodes the verification fee to zero and stores a fee token address but never approves or transfers that token, so it cannot satisfy the verifier's billing requirements.
Impact
Users cannot swap through pools whose active price provider depends on the paid Chainlink Data Streams feed once the previously stored report becomes stale, breaking core oracle update and swap functionality for the affected deployment.
What the attacker needed
ChainlinkOracle deployed with a real VerifierProxy; feeToken configured to the network billing token; Verifier charges a nonzero fee for the report; A pusher submits a valid report
The fix
The protocol team fixed this issue by implementing the Data Streams billing path so the required native or token fee is forwarded or paid before verification.
How it was found
- A valid Data Streams report becomes available and should refresh the Chainlink-backed feed.
- The pusher calls ChainlinkOracle.updateReport(fullReport).
- _verifyReport() calls VerifierProxy.verify() with msg.value == 0 and abi.encode(feeToken).
- For native-fee billing, the verifier receives no native fee; for token-fee billing, ChainlinkOracle has no ERC20 allowance or payment path.
- VerifierProxy.verify() reverts before returning verified report data, so _store() is never reached and the feed is not refreshed.
- Once the previous report exceeds maxTimeDelta, Chainlink-backed providers fail closed and swaps depending on them stop working.
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 smart contract that fetches prices from Chainlink's Data Streams service must pay a small fee each time it asks Chainlink to verify a new price report. This contract always sends a fee of zero and never sets up a way to pay with tokens, so Chainlink rejects the request and the price never updates. Once the old price is too old, any trading that relies on it stops working.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.