Submitted by IllIllI, also found by 0xNineDec, exd0tpy, and zzzitron
Put option buyers pay an option premium to the seller for the privilege of being able to put assets to the seller and get the strike price for it rather than the current market price. If theyre unable to perform the put, theyve paid the premium for nothing, and essentially have had funds stolen from them.
If the put option seller includes in order.erc20Assets, an amount of zero for any of the assets, or specifies an asset that doesnt currently have any code at its address, the put buyer will be unable to exercise the option, and will have paid the premium for nothing:
https://github.com/code-423n4/2022-06-putty/blob/3b6b844bc39e897bd0bbb69897f2deff12dc3893/contracts/src/PuttyV2.sol#L453-L454
The function reverts if any amount is equal to zero, or the asset doesnt exist:
https://github.com/code-423n4/2022-06-putty/blob/3b6b844bc39e897bd0bbb69897f2deff12dc3893/contracts/src/PuttyV2.sol#L593-L603
Verify the asset amounts and addresses during fillOrder(), and allow exercise if the token no longer exists at that point in time.
outdoteth (Putty Finance) confirmed and commented:
outdoteth (Putty Finance) resolved:
hyh (warden) reviewed mitigation:
