Maia DAO - Ulysses - Zims's results

Harnessing the power of Arbitrum, Ulysses Omnichain specializes in Virtualized Liquidity Management.

General Information

Platform: Code4rena

Start Date: 22/09/2023

Pot Size: $100,000 USDC

Total HM: 15

Participants: 175

Period: 14 days

Judge: alcueca

Total Solo HM: 4

Id: 287

League: ETH

Maia DAO

Findings Distribution

Researcher Performance

Rank: 143/175

Findings: 1

Award: $11.47

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/BranchPort.sol#L402-L411

Vulnerability details

Impact

updatePortStrategy() has no checks when called. Even an approved user can make a mistake and add an invalid _portStrategy or _token. addStrategyToken() has checks even though it has the same access control as updatePortStrategy(). When calling the function there is no revert if the caller makes a mistake. This might lead to excessive storage use of mistakes. And there is no warning if the caller makes a mistake

Proof of Concept

function updatePortStrategy(address _portStrategy, address _token, uint256 _dailyManagementLimit)
        external
        override
        requiresCoreRouter
    {
        strategyDailyLimitAmount[_portStrategy][_token] = _dailyManagementLimit;
        emit PortStrategyUpdated(_portStrategy, _token, _dailyManagementLimit);
    }

Accepts any input.

Tools Used

VScode, Audit Wizard

Include some checks to ensure there is already a strategy for the token before updating it.

function updatePortStrategy(address _portStrategy, address _token, uint256 _dailyManagementLimit) external override requiresCoreRouter { if (!isStrategyToken[_token]) revert UnrecognizedStrategyToken(); if (strategyDailyLimitAmount[_portStrategy][_token] == 0) revert StrategyTokenNotRegistered(); strategyDailyLimitAmount[_portStrategy][_token] = _dailyManagementLimit; emit PortStrategyUpdated(_portStrategy, _token, _dailyManagementLimit); }

StrategyTokenNotRegistered() error needs to be defined in IBranchPort.sol

Assessed type

Invalid Validation

#0 - c4-pre-sort

2023-10-15T05:06:48Z

0xA5DF marked the issue as low quality report

#1 - 0xA5DF

2023-10-15T05:06:59Z

Even an approved user can make a mistake

User error is QA

#2 - c4-judge

2023-10-23T14:55:23Z

alcueca changed the severity to QA (Quality Assurance)

#3 - c4-judge

2023-10-23T14:55:29Z

alcueca 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