Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

`Trustee:setAssetToPay` lacks proper checks

Summary

Due to protocol specifications, the asset cannot be Ether; otherwise, the buyOutEstateNFT function will fail due to ERC20 usage

Vulnerability Details

In the setAssetToPay function, the passed asset is assigned directly without proper checks

function setAssetToPay(address _asset) external onlyTrustee {
assetToPay = _asset;
}

Impact

Due to the configuration of buyOutEstateNFT, which operates only with ERC20 tokens, this can lead to a loss of funds

Recommendations

Implement a check before assigning the asset and revert if it is Ether

function setAssetToPay(address _asset) external onlyTrustee {
+ require(_asset != address(0), "Asset cannot be Ether");
assetToPay = _asset;
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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