DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: medium
Invalid

checkLog is wrong implemented in "MarketOrderKeeper"

Summary

In checklog we are using revert instead of return.

Vulnerability Details

function checkLog(
AutomationLog calldata log,
bytes calldata
)
external
view
override
returns (bool, bytes memory)
{
uint128 tradingAccountId = uint256(log.topics[LOG_CREATE_MARKET_ORDER_ACCOUNT_ID_INDEX]).toUint128();
(MarketOrder.Data memory marketOrder) = abi.decode(log.data, (MarketOrder.Data));
MarketOrderKeeperStorage storage self = _getMarketOrderKeeperStorage();
string[] memory streams = new string[](1);
streams[0] = self.streamId;
uint256 settlementTimestamp = marketOrder.timestamp;
bytes memory extraData = abi.encode(tradingAccountId);
@> revert StreamsLookup(
DATA_STREAMS_FEED_LABEL, streams, DATA_STREAMS_QUERY_LABEL, settlementTimestamp, extraData
);
}

Impact

checklog will always revert

Tools Used

Recommendations

return StreamsLookup(
DATA_STREAMS_FEED_LABEL, streams, DATA_STREAMS_QUERY_LABEL, settlementTimestamp, extraData
);

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.