Ethena Labs - rotcivegaf'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: 105/147

Findings: 1

Award: $4.52

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Ethenea QA report

verifyNonce first param returns always true

The boolean value returned by the function verifyNonce is returned by (_deduplicateOrder)[https://github.com/code-423n4/2023-10-ethena/blob/ee67d9b542642c9757a6b826c82d0cae60256509/contracts/EthenaMinting.sol#L392] function and finally used by mint and redeem functions

The value is always true so the call it's never revert with Duplicate() error

https://github.com/code-423n4/2023-10-ethena/blob/ee67d9b542642c9757a6b826c82d0cae60256509/contracts/EthenaMinting.sol#L385

verifyOrder first param returns always true

The boolean value returned by the function verifyOrder is always true and is not used by the contract, I recommend remove this returned value and returning only taker_order_hash

https://github.com/code-423n4/2023-10-ethena/blob/ee67d9b542642c9757a6b826c82d0cae60256509/contracts/EthenaMinting.sol#L347

Shadow variable owner inherit from SingleAdminAccessControl

owner param variable is shadowing owner() inherit from SingleAdminAccessControl

Recommendation: use _owner instead of owner to avoid collissions as you do on for example StakedUSDe.sol#L225

Unused errors

Recommendation: remove or use this errors

Unused import

SafeERC20.sol is imported but not used:

Recommendation: remove unused import

Unused events

Critical functions dont emit events

Critical functions should emit events

Recommendation: emit events on critical functions

EIP712 is not correctly implemented for the Route struct

As stated in the EIP712 standard - "The array values are encoded as the keccak256 hash of the concatenated encodeData of their contents". This is not correctly followed in EthenaMinting::encodeRoute as it does not do this for the Route struct array fields. While this is usually a more serious problem, the method is not called in the protocol and can just be removed.

https://github.com/code-423n4/2023-10-ethena/blob/ee67d9b542642c9757a6b826c82d0cae60256509/contracts/EthenaMinting.sol#L334

Nonce could overflow

Nonce can overflow and even if do a safeCast only con be used 256

https://github.com/code-423n4/2023-10-ethena/blob/ee67d9b542642c9757a6b826c82d0cae60256509/contracts/EthenaMinting.sol#L379-L380

#0 - c4-pre-sort

2023-11-02T01:32:12Z

raymondfam marked the issue as sufficient quality report

#1 - c4-judge

2023-11-14T17:10:42Z

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