Papr contest - SmartSek's results

NFT Lending Powered by Uniswap v3.

General Information

Platform: Code4rena

Start Date: 16/12/2022

Pot Size: $60,500 USDC

Total HM: 12

Participants: 58

Period: 5 days

Judge: Trust

Total Solo HM: 4

Id: 196

League: ETH

Backed Protocol

Findings Distribution

Researcher Performance

Rank: 43/58

Findings: 1

Award: $43.54

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

43.5439 USDC - $43.54

Labels

bug
downgraded by judge
grade-b
QA (Quality Assurance)
Q-14

External Links

Lines of code

https://github.com/with-backed/papr/blob/9528f2711ff0c1522076b9f93fba13f88d5bd5e6/src/PaprController.sol#L98-L106

Vulnerability details

Impact

Even though it is used as an example in the "How it Works" section PUNKs are not currently supported.

Proof of Concept

CryptoPunks was created before the ERC721 standard and therefore, doesn't have a transferFrom function. CryptoPunks address: 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB

https://github.com/with-backed/papr/blob/9528f2711ff0c1522076b9f93fba13f88d5bd5e6/src/PaprController.sol#L98-L106

    function addCollateral(IPaprController.Collateral[] calldata collateralArr) external override {
        for (uint256 i = 0; i < collateralArr.length;) {
            _addCollateralToVault(msg.sender, collateralArr[i]);
            collateralArr[i].addr.transferFrom(msg.sender, address(this), collateralArr[i].id); //@audit unsafe NFT transfer
            unchecked {
                ++i;
            }
        }
    }

Supporting CryptoPunks would require the implementation of specialised functions that handle the collection.

#0 - trust1995

2022-12-25T13:50:13Z

Standardized at the org level to be NC severity.

#1 - c4-judge

2022-12-25T13:50:19Z

trust1995 changed the severity to QA (Quality Assurance)

#2 - c4-judge

2022-12-25T17:22:36Z

trust1995 marked the issue as grade-b

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