Pieces Protocol

First Flight #32
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: medium
Invalid

There is no withdraw tax function for Owner

Summary

There is no withdraw tax function for Owner

Vulnerability Details

When the buyer is purchaing the order, the tax is sent to contract in buyOrder().

(bool taxSuccess, ) = payable(owner()).call{value: fee}("");

But there is no functino for withdraw tax.

Impact

The Owner Loss of all Tax.

Tools Used

Manual Review

Recommendations

you should implement the withdraw function on the contract

function withdraw(payable addrss to) external onlyOwner {
(bool success, ) = to.call{value: this.balance}("");
require(success, "Payment failed.");
}
Updates

Lead Judging Commences

fishy 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.