Platform: Code4rena
Start Date: 10/05/2022
Pot Size: $50,000 USDC
Total HM: 13
Participants: 100
Period: 5 days
Judge: HardlyDifficult
Total Solo HM: 1
Id: 122
League: ETH
Rank: 78/100
Findings: 2
Award: $48.58
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: BondiPestControl
Also found by: 0xf15ers, GimelSec, IllIllI, MadWookie, MiloTruck, Ruhum, VAD37, berndartmueller, cccz, csanuragjain, dipp, hake, horsefacts, jayjonah8, m9800, pedroais, throttle
31.6149 USDC - $31.61
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L224
In Cally.sol
the buyOption()
function requires that the msg.value
is greater than or equal to the premium
when it should always be greater and not equal since the premium is the base fee to buy the option. The msg.value
should naturally always be higher than the base fee when buying an option.
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L224
Manual code review
- require(msg.value >= premium, "Incorrect ETH amount sent"); + require(msg.value > premium, "Incorrect ETH amount sent");
#0 - outdoteth
2022-05-15T16:57:01Z
It should be equal not greater
require(msg.value == premium);
Not sure if this qualifies as an issue because it gives the incorrect solution but does identify an issue
#1 - outdoteth
2022-05-15T17:00:32Z
reference issue: https://github.com/code-423n4/2022-05-cally-findings/issues/84
#2 - HardlyDifficult
2022-05-22T20:33:28Z
Yes, we'll still consider this a valid submission -- the more important point is they identified an issue. Keeping this as a dupe
16.9712 USDC - $16.97
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L199
In Cally.sol
the createVault()
function calls transferFrom()
on a ERC721 token. This does not ensure that the ERC721 token is not sent to an address that is not able to properly support it which could result in the loss of the token.
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L199.
Manual code review
Making use of the safeTransferFrom()
function will ensure that whoever receives the ERC721 token is able to properly support it. This protects users from losing tokens.
#0 - outdoteth
2022-05-15T20:41:07Z
use safeTransferFrom to prevent stuck NFTs: https://github.com/code-423n4/2022-05-cally-findings/issues/38