User may not receive token when claim fees, resulting in loss of user funds.
The three claim fee functions in the Market: claimHolderFee claimCreatorFee claimPlatformFee, they all have the same problem.
Proof of Concept
In general, defi protocols can specify recipients when claiming fees, because msg.sender may not be able to accept the token
Lines of code
https://github.com/code-423n4/2023-11-canto/blob/335930cd53cf9a137504a57f1215be52c6d67cb3/1155tech-contracts/src/Market.sol#L263
Vulnerability details
Impact
User may not receive token when claim fees, resulting in loss of user funds. The three claim fee functions in the Market: claimHolderFee claimCreatorFee claimPlatformFee, they all have the same problem.
Proof of Concept
In general, defi protocols can specify recipients when claiming fees, because msg.sender may not be able to accept the token
The reasons are as follows:
Market#claimHolderFee use msg.sender as the recipient:
claimCreatorFee claimPlatformFee also uses msg.sender as the receiver.
Tools Used
vscode manual
Recommended Mitigation Steps
Assessed type
Other