Submitted by 0xrex, also found by 0xAkira and aua_oo7
https://github.com/code-423n4/2024-12-secondswap/blob/main/contracts/SecondSwap_Marketplace.sol#L360
Minimum listing duration is currently set at 2 mins, at which point a listing cancellation will no longer incur the fee when unlisted less than 2 minutes since it got listed. However, users can be charged an outdated fee which is more or less the initial fee they expected to pay.
Suppose the user were to pay 2 USDC for unlisting, then the fee changes to 5, they would end up paying twice the initial amount.
Having a cache of the fee stored in the listing struct of the listing ID would be sufficient to figure out which fee to charge them.
Koolex (judge) commented:
