incorrect operator used in buyOption()
function
#56
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
Lines of code
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L224
Vulnerability details
Impact
In
Cally.sol
thebuyOption()
function requires that themsg.value
is greater than or equal to thepremium
when it should always be greater and not equal since the premium is the base fee to buy the option. Themsg.value
should naturally always be higher than the base fee when buying an option.Proof of Concept
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L224
Tools Used
Manual code review
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: