Overpaying option premium #237
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L224
Vulnerability details
Impact
It is possible for the option buyer to overpay the defined option premium without getting compensated the overpay.
Proof of Concept
Cally.sol#L224
Tools Used
Manual review
Recommended mitigation steps
As there is no benefit for paying more premium than set by the option writer (vault owner), consider preventing the option buyer from overpaying the option premium by adapting the
require
statement as following:The text was updated successfully, but these errors were encountered: