Delegate - kodyvim's results

Securing onchain identities by linking cold and hot wallets

General Information

Platform: Code4rena

Start Date: 05/09/2023

Pot Size: $50,000 USDC

Total HM: 2

Participants: 16

Period: 6 days

Judge: GalloDaSballo

Total Solo HM: 2

Id: 284

League: ETH

Delegate

Findings Distribution

Researcher Performance

Rank: 11/16

Findings: 1

Award: $40.13

QA:
grade-b

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: DadeKuma

Also found by: Brenzee, Fulum, gkrastenov, kodyvim, ladboy233, lodelux, lsaudit, p0wd3r, sces60107

Labels

bug
disagree with severity
downgraded by judge
grade-b
QA (Quality Assurance)
sponsor acknowledged
Q-07

Awards

40.1294 USDC - $40.13

External Links

Lines of code

https://github.com/code-423n4/2023-09-delegate/blob/main/src/libraries/DelegateTokenTransferHelpers.sol#L35

Vulnerability details

Impact

Strict allowance could affect third party integration

Proof of Concept

Protocols or third party integration seeking to build on delegate could be unable upon to create() with approved NFT tokens. These integrations might not necessarily need to transfer the nft from the user. When creating a delegate position: checkAndPullByType -> checkERC721BeforePull is called. https://github.com/code-423n4/2023-09-delegate/blob/main/src/libraries/DelegateTokenTransferHelpers.sol#L35

function checkERC721BeforePull(uint256 underlyingAmount, address underlyingContract, uint256 underlyingTokenId) internal view {
        if (underlyingAmount != 0) {
            revert Errors.WrongAmountForType(IDelegateRegistry.DelegationType.ERC721, underlyingAmount);
        }
        if (IERC721(underlyingContract).ownerOf(underlyingTokenId) != msg.sender) {//<@
            revert Errors.CallerNotOwnerOrInvalidToken();
        }
    }

because it strictly checks that the owner is the caller and does not allow from approved users, any approved user call to create would fail.

Tools Used

Manual Review

Consider allowing both the owners or approved users to create delegate using the NFT.

Assessed type

Context

#0 - c4-sponsor

2023-09-20T23:03:12Z

0xfoobar marked the issue as disagree with severity

#1 - c4-sponsor

2023-09-20T23:03:16Z

0xfoobar (sponsor) acknowledged

#2 - GalloDaSballo

2023-10-02T07:41:58Z

Similarly to #279 the operator cannot perform a certain operation

This will not cause any substantial DOS nor breaks the system in any particular way, since the Operator can: -> Transfer to Self -> Perform the operation

#3 - c4-judge

2023-10-02T07:42:11Z

GalloDaSballo changed the severity to QA (Quality Assurance)

#4 - c4-judge

2023-10-02T11:47:31Z

GalloDaSballo marked the issue as grade-b

#5 - GalloDaSballo

2023-10-02T11:47:37Z

Manually awarded B as a notable QA finding

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