Papr contest - 0xAgro'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: 41/58

Findings: 1

Award: $43.54

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

43.5439 USDC - $43.54

Labels

bug
grade-b
QA (Quality Assurance)
Q-11

External Links

QA Report

Finding Summary

IssueInstances
[NC-01]Long Lines (> 120 Characters)7
[NC-02]Spelling Mistakes3
[NC-03]Trailing . In NatSpec Voids General Style2
[NC-04]Power of Ten Literal > 10e3 Not In Scientific Notation1
[NC-05]Order of Functions Not Compliant With Solidity Docs1

[NC-01] Long Lines (> 120 Characters)

Lines with greater length than 120 characters are used. The Solidity Style Guide suggests that all lines should be 120 characters or less in width.

Findings:

/src/PaprController.sol Links: 77, 122.

77:	        UniswapOracleFundingRateController(underlying, new PaprToken(name, symbol), indexMarkRatioMax, indexMarkRatioMin)
122:	                    underwritePriceForCollateral(collateralAddr, ReservoirOracleUnderwriter.PriceKind.LOWER, oracleInfo);

/src/interfaces/IPaprController.sol Links: 66, 164, 251, 257, 260.

66:	    /// @dev vaults are uniquely identified by the address of the vault owner and the address of the collateral token used in the vault
164:	    /// @notice removes debt from a vault and burns it by buying it on Uniswap in exchange for the controller's underlying token
251:	    /// @notice amount the price of an auction decreases by per auctionDecayPeriod, expressed as a decimal scaled by 1e18
257:	    /// @notice the multiplier for the starting price of an auction, applied to the current price of the collateral in papr tokens
260:	    /// @notice fee paid by the vault owner when their vault is liquidated if there was excess debt credited to their vault, in bips

[NC-02] Spelling Mistakes

There are a few spelling mistakes throughout the codebase. Consider fixing all spelling mistakes.

Findings:

The word successful is misspelled as succesful.

/src/PaprController.sol Links: 158.

158:	/// @return selector indicating succesful receiving of the NFT

The word definition is misspelled as defintion.

/src/NFTEDA/NFTEDA.sol Links: 46.

158:	/// @param auction The defintion of the auction

The word Identical is misspelled as Identitical.

/src/NFTEDA/interfaces/INFTEDA.sol Links: 58.

58:	/// @dev Derived from the auction. Identitical auctions cannot exist simultaneously

[NC-03] Trailing . In NatSpec Voids General Style

There are times where NatSpec comments end with a . in the codebase; however, most do not. Consider removing any . that swims away from the general style.

Findings

/src/NFTEDA/NFTEDA.sol Links: 44.

44:	/// @dev does no validation the auction, aside that it does not exist.

/src/interfaces/IFundingRateController.sol Links; 28, 29.

28:	/// value, then funding rates are 0 and newTarget() will equal target().
29:	/// @return target The value of one whole unit of papr in underlying units.

[NC-04] Power of Ten Literal > 10e3 Not In Scientific Notation

Power of ten literals > 10e3 are easier to read when expressed in scientific notation. Consider expressing large powers of ten in scientific notation (Ex. 10e5).

Findings:

/src/PaprController.sol Links: 92.

92:	address _pool = UniswapHelpers.deployAndInitPool(address(underlying), address(papr), 10000, initSqrtRatio);

[NC-05] Order of Functions Not Compliant With Solidity Docs

The Solidity Style Guide suggests the following function ordering: constructor, receive function (if exists), fallback function (if exists), external, public, internal, private.

Findings:

The following contracts are not compliant (examples are only to prove the functions are out of order NOT a full description):

UniswapOracleFundingRateController.sol: external functions are positioned after public functions.

#0 - c4-judge

2022-12-25T13:26:23Z

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