Astaria contest - fatherOfBlocks's results

On a mission is to build a highly liquid NFT lending market.

General Information

Platform: Code4rena

Start Date: 05/01/2023

Pot Size: $90,500 USDC

Total HM: 55

Participants: 103

Period: 14 days

Judge: Picodes

Total Solo HM: 18

Id: 202

League: ETH

Astaria

Findings Distribution

Researcher Performance

Rank: 58/103

Findings: 2

Award: $88.11

QA:
grade-b
Gas:
grade-b

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

src/Vault.sol

  • L65/71 - When a require is used, a message should be put in case it is reverted to inform the user. In these cases that does not happen.

src/ClearingHouse.sol

  • L17/25 - Two classes are imported (WETH and ConduitControllerInterface) that are never used, therefore they should be removed.

  • L72/199/216/223 - When a require is used, a message should be put in case it is reverted to inform the user. In these cases that does not happen.

src/CollateralToken.sol

  • L33/53/59 - Two classes are imported (VaultImplementation, SeaportInterface and OrderComponents) that are never used, therefore they should be removed.

  • L266/535/564 - When a require is used, a message should be put in case it is reverted to inform the user. In these cases that does not happen.

src/PublicVault.sol

  • L240 - IERC4626 is imported but never used, so it should be removed.

  • L241/259/508/672/680/687 - When a require is used, a message should be put in case it is reverted to inform the user. In these cases that does not happen.

src/AstariaRouter.sol

  • L341/347/354/361 - When a require is used, a message should be put in case it is reverted to inform the user. In these cases that does not happen.

src/LienToken.sol

  • L18/34 - Two classes are imported (Auth and VaultImplementation) that are never used, therefore they should be removed.

  • L504/860 - When a require is used, a message should be put in case it is reverted to inform the user. In these cases that does not happen.

src/AstariaVaultBase.sol

  • L18/21 - Two classes are imported (IERC4626 and IRouterBase) that are never used, therefore they should be removed.

lib/gpl/src/ERC20-Cloned.sol

  • L4 - IERC20 is imported but never used, so it should be removed.

src/VaultImplementation.sol

  • L25 - IPublicVault is imported but never used, so it should be removed.

  • L78/96/105/114/147/191/211 - When a require is used, a message should be put in case it is reverted to inform the user. In these cases that does not happen.

src/interfaces/IAstariaRouter.sol

  • L16/18/25 - Two classes are imported (IERC721, IERC4626 and IERC4626RouterBase) that are never used, therefore they should be removed.

  • L33/37 - Within the FileType enum there are two values ​​that are never used, MinInterestRate and StrategistFee, therefore they should be eliminated.

src/interfaces/ILienToken.sol

  • L328/331/332 - Within the InvalidStates enum there are two values ​​that are never used, NOT_ENOUGH_FUNDS, LIEN_NO_DEBT and COLLATERAL_NOT_DEPOSITED, therefore they should be eliminated.

src/interfaces/ICollateralToken.sol

  • L27 - IERC1155 is imported but never used, so it should be removed.

  • L171 - An error is created that is never used, ListPriceTooLow, therefore it should be eliminated.

src/interfaces/IVaultImplementation.sol

  • L60 - The IncrementNonce event is created but it is never used, therefore it should be removed.

#0 - c4-judge

2023-01-26T14:51:40Z

Picodes marked the issue as grade-b

Awards

36.79 USDC - $36.79

Labels

bug
G (Gas Optimization)
grade-b
G-19

External Links

src/CollateralToken.sol

  • L138/139/342 - Two variables are created in memory that are never used, therefore it is not necessary to create the variables.

  • L558/602 - It is not necessary to create a modifier method if it is only used once, you could directly use the if and revert within the used method.

src/PublicVault.sol

  • L491/492/657/658 - It is not necessary to create a variable if it is only going to be used once, therefore the operation could be used directly where it is needed.

src/LienToken.sol

  • L260/262/632/670/681 - It is not necessary to create a variable if it is only going to be used once, therefore the operation could be used directly where it is needed.

src/VaultImplementation.sol

  • L399/400 - It is not necessary to create a variable if it is only going to be used once, therefore the operation could be used directly where it is needed.

#0 - c4-judge

2023-01-25T23:55:41Z

Picodes 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