Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: low
Invalid

getOfferInfo does not return explicitly

Summary

getOfferInfo in DeliveryPlace.sol uses implicit return

Vulnerability Details

Most functions in the code that return values do it explicitly, while getOfferInfodoesn't.

Consider returning explicitly, which may reduce future errors or prevent regressions if the code changes since the contract is upgradeable.

function getOfferInfo(
address _offer
)
internal
view
returns (
OfferInfo memory offerInfo,
MakerInfo memory makerInfo,
MarketPlaceInfo memory marketPlaceInfo,
MarketPlaceStatus status
)
{
IPerMarkets perMarkets = tadleFactory.getPerMarkets();
ISystemConfig systemConfig = tadleFactory.getSystemConfig();
offerInfo = perMarkets.getOfferInfo(_offer);
makerInfo = perMarkets.getMakerInfo(offerInfo.maker);
marketPlaceInfo = systemConfig.getMarketPlaceInfo(
makerInfo.marketPlace
);
status = MarketPlaceLibraries.getMarketPlaceStatus(
block.timestamp,
marketPlaceInfo
);
}

Impact

Low, it does not affect the contract as it is but may affect future versions because the code is upgradeable and other functions in the code do return explicitly.

Tools Used

Manual review

Recommendations

Add return in the end of getOfferInfo:

returns (offerInfo, makerInfo, marketPlaceInfo,status);
Updates

Lead Judging Commences

0xnevi Lead Judge
about 1 year ago
0xnevi 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.