Cally contest - throttle'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: 81/100

Findings: 2

Award: $39.78

🌟 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/main/contracts/src/Cally.sol#L117-L121

Vulnerability details

Impact

Admin can change fee parameter at any time.

Proof of Concept

First of all, the fee parameter is unbounded. It can be as high as 100%. https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L117-L121

Additionally, an admin can change fee parameter for any sale at any time. For example, an admin can change the fee after the vault is created or call option is bought. And before call option is exercised.

POC:

  1. Alice sees that the fee is 0%. She creates a vault with very popular and valuable NFT (price 100 ETH)
  2. Bob, the trader buys the call option.
  3. Admin changes fee to 30% (or 100% if admin being malicious).
  4. NFT market booming. NFTs are even more valuable. Bob decided to exercise his option.
  5. Alice gets only 70 ETH (0 ETH if admin being malicious).

Tools Used

Manual review

  1. Bound fee change. For example < 20%
  2. Store fee parameter in a vault struct during vault creation and use that fee for accounting.

#0 - outdoteth

2022-05-15T19:16:59Z

Awards

31.6149 USDC - $31.61

Labels

bug
duplicate
2 (Med Risk)

External Links

[L-01] Payment excess is not given back

Description

Trader can overpay for the call option premium. https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L224

Return excess to the rightful user.

-----------------------------------------------------------------

#0 - outdoteth

2022-05-16T18:48:56Z

this can be bumped to medium severity; [L-01] Payment excess is not given back; https://github.com/code-423n4/2022-05-cally-findings/issues/84

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