verifyOffchainPrice
does not pay native fee for offchain data. The protocol is supposed to pay the fee to chainlink for their services but in the code it is not enforced.
https://github.com/Cyfrin/2024-07-zaros/blob/d687fe96bb7ace8652778797052a38763fbcbb1b/src/perpetuals/branches/SettlementBranch.sol#L107-L166
https://github.com/Cyfrin/2024-07-zaros/blob/d687fe96bb7ace8652778797052a38763fbcbb1b/src/perpetuals/branches/SettlementBranch.sol#L138-L139
In SettlementBranch
when the keeper wants to fillMarketOrder
or fillOffchainsOrders
he should pay the fee in native token for verifing the report. However fillMarketOrder
and fillOffchainsOrders
are non-payable. Native tokens can not be sent with the function call.
These functions call verifyOffchainPrice
.
verifyOffchainPrice
calls verifyDataStreamsReport
.
verifyDataStreamsReport
calls getReportData
, getEthVericationFee
and verifyReport
. verifyReport
has fee as one of the input parameters which is calculated in getEthVericationFee
.
Finally verifyReport
calls verify
which requires payment. It is calculated but never sent.
Protocol won't be able to verify prices. All functionality based on that will be unavailable for users. The protocol will suffer from DoS.
Pay the required fee in native token or in link
token as suggested in chainlink docs.
https://docs.chain.link/chainlink-automation/guides/streams-lookup
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.