Ethena Labs - PASCAL's results

Enabling The Internet Bond

General Information

Platform: Code4rena

Start Date: 24/10/2023

Pot Size: $36,500 USDC

Total HM: 4

Participants: 147

Period: 6 days

Judge: 0xDjango

Id: 299

League: ETH

Ethena Labs

Findings Distribution

Researcher Performance

Rank: 115/147

Findings: 1

Award: $4.52

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-10-ethena/blob/ee67d9b542642c9757a6b826c82d0cae60256509/contracts/EthenaMinting.sol#L351-L355 https://github.com/code-423n4/2023-10-ethena/blob/ee67d9b542642c9757a6b826c82d0cae60256509/contracts/EthenaMinting.sol#L169-L171

Vulnerability details

Impact

The EthenaMinting.mint function will always revert .

Proof of Concept

The orderType passed into the mint function, is of type mint so there is a check to verify the route.

function mint(Order calldata order, Route calldata route, Signature calldata signature) external override nonReentrant onlyRole(MINTER_ROLE) belowMaxMintPerBlock(order.usde_amount) { if (order.order_type != OrderType.MINT) revert InvalidOrder(); verifyOrder(order, signature); if (!verifyRoute(route, order.order_type)) revert InvalidRoute();

Inside the verifyRoute() there is a check that returns true if the orderType == REDEEM,

function verifyRoute(Route calldata route, OrderType orderType) public view override returns (bool) { // routes only used to mint if (orderType == OrderType.REDEEM) { return true;

Which is not supposed to be so since in mint function if verifyRouter returns false it reverts and the orderType passed from the mint function into the verifyRoute function is always of type mint so it will always revert.

Tools Used

Manual Review

Change that REDEEM to MINT in the verifyRouter or change the true to false

Assessed type

DoS

#0 - c4-pre-sort

2023-11-01T02:30:24Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2023-11-01T02:30:39Z

raymondfam marked the issue as duplicate of #36

#2 - c4-judge

2023-11-13T19:18:21Z

fatherGoose1 marked the issue as unsatisfactory: Invalid

#3 - c4-judge

2023-11-20T20:13:19Z

fatherGoose1 changed the severity to QA (Quality Assurance)

#4 - c4-judge

2023-11-20T20:15:38Z

fatherGoose1 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