Redacted Cartel contest - nameruse's results

Boosted GMX assets from your favorite liquid token wrapper, Pirex - brought to you by Redacted Cartel.

General Information

Platform: Code4rena

Start Date: 21/11/2022

Pot Size: $90,500 USDC

Total HM: 18

Participants: 101

Period: 7 days

Judge: Picodes

Total Solo HM: 4

Id: 183

League: ETH

Redacted Cartel

Findings Distribution

Researcher Performance

Rank: 60/101

Findings: 1

Award: $53.49

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Summary

Overall the codebase is quite readable, well organized and matched well with the specs described in the documenations. Its make use of several best practices like using up to date solidity version (0.8.17) and organized structure when its comes to delcaration of state variable, events and functions. Variable naming for the most part is quite good, considering the complexity of the protocol. Comments were used rigourously and were beneficial and accurate in describing the object they were comenting on.

Non-Critical issues

[NC-01] No Indexed Field for Event

instances:1

File: PirexRewards.sol Line: 63 Link

event Harvest(
        ERC20[] producerTokens,
        ERC20[] rewardTokens,
        uint256[] rewardAmounts
    );
[NC-02]

Could include conditional check similar to _globalaccrue() function to update when needed only. if (block.timestamp != lastUpdate || balance != lastbalance){}

instances:1

File: PirexRewards.sol Line: 289 Link

 // Calculate the amount of rewards accrued by the user up to this call
uint256 rewards = u.rewards +
       u.lastBalance *
        (block.timestamp - u.lastUpdate);
[NC-03] Renaming Variable for Improved Readbility

Consider renaming assets to assetAmount for clearer readablity, as assets implicity portrays an ERC20 types

instances:4

File: AutoPxGlp.sol Line: 436-440 Link

 function withdraw(
        uint256 assets,
        address receiver,
        address owner
    ) public override returns (uint256 shares) {

File: AutoPxGlp.sol Line: 449-453 Link

function redeem(
        uint256 shares,
        address receiver,
        address owner
    ) public override returns (uint256 assets) {

File: AutoPxGmx.sol Line: 315-319 Link

 function withdraw(
        uint256 assets,
        address receiver,
        address owner
    ) public override returns (uint256 shares) {

File: AutoPxGmx.sol Line: 339-343 Link

function redeem(
        uint256 shares,
        address receiver,
        address owner
    ) public override returns (uint256 assets) {
[NC-04] Missing Comments for Functions

Missing comments for function, adding comments will add more clarity for this function

instances:2

File: AutoPxGmx.sol Line: 315-319 Link

 function withdraw(
        uint256 assets,
        address receiver,
        address owner
    ) public override returns (uint256 shares) {

File: AutoPxGmx.sol Line: 339-343 Link

function redeem(
        uint256 shares,
        address receiver,
        address owner
    ) public override returns (uint256 assets) {

#0 - c4-judge

2022-12-05T09:01:09Z

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