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: 58/100
Findings: 3
Award: $80.62
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0x52, 0xf15ers, 0xsanson, Bludya, BondiPestControl, Czar102, GimelSec, Kumpa, _Adam, berndartmueller, catchup, crispymangoes, eccentricexit, ellahi, hake, horsefacts, pedroais, peritoflores, reassor, shenwilly, shung, smiling_heretic, sseefried, throttle
8.1655 USDC - $8.17
In the case that the owner's address is compromised or the owner rug pull, the owner could buyOption()
from a vault and later exercise the option at a zero cost by updating the feeRate so that the fee can be as high as the currentstrike. ethBalance[getVaultBeneficiary(vaultId)]
will equal to zero and the vault beneficiary will get nothing while his asset get stolen. This issue should be fixed to maintain the contract's reputation and trust from the user.
feeRate
at 1%createVault()
and deposits her nftbuyOption
from Alice's vaultsetFee()
to 100% of the currentstrikevault.currentstrike
feeRate
, the fee will be equal to the currentstrike and ethBalance[getVaultBeneficiary(vaultId)]
will be equal to zero#0 - outdoteth
2022-05-15T19:03:05Z
owner can change fee at any time; https://github.com/code-423n4/2022-05-cally-findings/issues/47 owner can set fee greater than 100%: https://github.com/code-423n4/2022-05-cally-findings/issues/48
16.9712 USDC - $16.97
Judge has assessed an item in Issue #119 as Medium risk. The relevant finding follows:
Checking whether the receiver is capable of holding ERC721 The contract usessafeTransfer() for ERC20 but uses transferFrom() for ERC721 in both exercise() and withdraw() which may lead to the loss of ERC721 if the receiving contract does not have onERC721Received(). To prevent this unintended circumstance, the contract should replace this function with safeTransferFrom() for ERC721 to check whether the receiving contract is IERC721Receiver.
#0 - HardlyDifficult
2022-06-06T00:25:26Z
🌟 Selected for report: hubble
Also found by: 0x1337, 0x1f8b, 0x4non, 0xDjango, 0xf15ers, 0xsanson, 242, Aits, AlleyCat, Bludya, BondiPestControl, BouSalman, BowTiedWardens, CertoraInc, Cityscape, Czar102, FSchmoede, Funen, Hawkeye, IllIllI, JDeryl, Kenshin, Kumpa, MaratCerby, MiloTruck, Picodes, Ruhum, TrungOre, VAD37, WatchPug, Waze, antonttc, bobirichman, catchup, cccz, cryptphi, csanuragjain, delfin454000, dipp, dirk_y, djxploit, eccentricexit, ellahi, fatherOfBlocks, hake, hansfriese, hickuphh3, horsefacts, hyh, jah, joestakey, mics, minhquanym, pedroais, pmerkleplant, radoslav11, reassor, rfa, robee, seanamani, shenwilly, shung, sikorico, sorrynotsorry, sseefried, z3s
55.4781 USDC - $55.48
The user may accidently set the durationDays
to be max of uint8 (255 days) and has his asset locked up for a very long time if the option's buyer does not exercise the option. I think that it would be in the best interest of the user if the locked-up period is fixed to a reasonable period like 30 days and the contract's owner should cleary communicate about the risk of user's asset unintentionally getting locked up if the option is not exercised.
transferOwnership()
Transfering ownership should be two step processes. The contract relies on openzeppelin's ownable which maybe problematic. Even when the function checks for zero address, it overlooks the case that the current owner may accidently input wrong address. To add additional security layer, the contract should add the acceptOwnership()
that the nominated account will have to call
The contract usessafeTransfer()
for ERC20 but uses transferFrom()
for ERC721 in both exercise()
and withdraw()
which may lead to the loss of ERC721 if the receiving contract does not have onERC721Received()
. To prevent this unintended circumstance, the contract should replace this function with safeTransferFrom()
for ERC721 to check whether the receiving contract is IERC721Receiver.
#0 - outdoteth
2022-05-16T18:28:10Z
this can be bumped to medium severity:
Checking whether the receiver is capable of holding ERC721; https://github.com/code-423n4/2022-05-cally-findings/issues/38
#1 - HardlyDifficult
2022-05-25T13:14:37Z
Moved receiver check to https://github.com/code-423n4/2022-05-cally-findings/issues/317