Cally contest - 0x52's results

Earn yield on your NFTs or tokens via covered call vaults.

General Information

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

Cally

Findings Distribution

Researcher Performance

Rank: 95/100

Findings: 2

Award: $19.06

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

8.1655 USDC - $8.17

Labels

bug
duplicate
2 (Med Risk)
sponsor confirmed

External Links

Lines of code

https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L283-L285

Vulnerability details

Impact

Option seller receives less than desired minimum

Proof of Concept

Admins can update the protocol fees by calling setfee(). The seller will receive the agreed strike price less the protocol fee. If the fee is changed after the option is sold then seller will receive less than expected

Tools Used

Add a fee parameter to the vault struct and cache the current fee when the vault is created. When calculating fee on exercise, use that calculate fee

#0 - outdoteth

2022-05-15T19:03:44Z

Awards

10.8874 USDC - $10.89

Labels

bug
duplicate
2 (Med Risk)
sponsor confirmed

External Links

Lines of code

https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L173-L185

Vulnerability details

Impact

Loss of user funds in contract

Proof of Concept

In L174 the vault sets the quantity of ERC20 it has to the amount specified on input. However for fee on transfer tokens, the actual amount received would be short the fee taken on transfer. This would completely lock up the vault, breaking both the exercise and withdraw function because the transfer at the end would always fail due to insufficient token balance

Tools Used

Record the balance of the contract before and after receiving the transfer to determine the number of ERC20 tokens actually received

#0 - outdoteth

2022-05-15T17:13:27Z

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter