Maia DAO - Ulysses - 0xsurena'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: 108/175

Findings: 1

Award: $25.68

QA:
grade-a

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/BranchBridgeAgent.sol#L832 https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/BranchBridgeAgent.sol#L354

Vulnerability details

Impact

The transaction to the retryDeposit function can get reverted.

Proof of Concept

When the user call callOutAndBridge function, user can choose value of _refundee as the address to return excess gas deposited in msg.value to. https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/BranchBridgeAgent.sol#L210

The callOutAndBridge will call _createDeposit to move assets from branch chain to root and create deposit data for user. in the deposit data, contract is using _refundee value as owner of deposit transaction / data. https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/BranchBridgeAgent.sol#L832

Now if the user needs to retry the deposit transaction The deposit that is already created, the user should call retryDeposit function. in this function, first, contract check if deposit belongs to message sender. if MSG.SENDER is the owner of the deposit, it's ok, else the transaction will get reverted. https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/BranchBridgeAgent.sol#L354

Now in the callOutAndBridge, if the user uses another address as _refundee value, the owner of the deposit transaction will be another address, and the user is not able to use retryDeposit function for the deposit transaction in future.

Tools Used

Manually

I think best option is to use msg.sender as the owner of deposit. https://github.com/code-423n4/2023-05-maia/blob/1a95ffeaa057f14e6f317f7c3af84def2db16309/src/ulysses-omnichain/BranchBridgeAgent.sol#L264

Assessed type

Other

#0 - c4-pre-sort

2023-10-11T12:40:20Z

0xA5DF marked the issue as duplicate of #858

#1 - c4-pre-sort

2023-10-11T12:40:25Z

0xA5DF marked the issue as sufficient quality report

#2 - c4-judge

2023-10-26T06:12:58Z

alcueca changed the severity to QA (Quality Assurance)

#3 - c4-judge

2023-10-26T06:15:05Z

alcueca marked the issue as grade-a

#4 - alcueca

2023-10-26T06:15:29Z

Documentation issue, the _refundee is actually the deposit owner if the caller decides that it should be anyone else.

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