Frax Ether Liquid Staking contest - ayeslick's results

A liquid ETH staking derivative designed to uniquely leverage the Frax Finance ecosystem.

General Information

Platform: Code4rena

Start Date: 22/09/2022

Pot Size: $30,000 USDC

Total HM: 12

Participants: 133

Period: 3 days

Judge: 0xean

Total Solo HM: 2

Id: 165

League: ETH

Frax Finance

Findings Distribution

Researcher Performance

Rank: 11/133

Findings: 3

Award: $630.32

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

19.982 USDC - $19.98

Labels

bug
duplicate
2 (Med Risk)

External Links

Lines of code

https://github.com/code-423n4/2022-09-frax/blob/main/src/frxETHMinter.sol#L192

Vulnerability details

Impact

There can be a period of time between a customer calling the submit function and someone calling the depositEther function. During this time a malicious/compromised admin(s) can call the recoverEther function specifying an amount and removing it from the contract.

Proof of Concept

Depositors deposit 30 ETH into the contract over so much time. Malicious/Compromised Admin(s) calls the recoverEther function and drains the contract.

Remove this function

#0 - FortisFortuna

2022-09-25T21:23:39Z

We are well aware of the permission structure. The owner will most likely be a large multisig. We mentioned the Frax Multisig in the scope too. If moving funds, it is assumed someone in the multisig would catch an invalid or malicious address.

#1 - joestakey

2022-09-26T16:24:28Z

Duplicate of #107

Findings Information

🌟 Selected for report: ronnyx2017

Also found by: ayeslick, rvierdiiev

Labels

bug
duplicate
2 (Med Risk)

Awards

582.3084 USDC - $582.31

External Links

Lines of code

https://github.com/code-423n4/2022-09-frax/blob/main/src/frxETHMinter.sol#L166

Vulnerability details

Impact

A malicious/compromised admin(s) can set the to address to the frxETHMinter contract, “sending” ETH to the contract triggering the receive function. This leads to the contract minting more frxETHToken devaluing it.

Proof of Concept

Depositors deposit 50 ETH into the contract with 10 ETH being assigned to the currentWithheldETH variable. A malicious/compromised admin(s) sets the to address to the frxETHMinter contract and the amount to 10 ETH. Once called the contract will mint 10 additional frxETHToken even though no new ETH was deposited into the contract.

Don’t allow the to address to be set to the frxETHMinter contract address.

#0 - FortisFortuna

2022-09-25T23:12:04Z

We are well aware of the permission structure. The owner will most likely be a large multisig. We mentioned the Frax Multisig in the scope too. If moving funds, it is assumed someone in the multisig would catch an invalid or malicious address.

#1 - joestakey

2022-09-26T16:25:04Z

Duplicate of #221

OperatorRegistry:

setTimeLock: The function doesn’t make sure the address is a contract

Recommendation: Check the address to make sure it’s a contract.

addValidator: The function allows for duplicate validators

Recommendation: Check if the validator is already within the array. If it is revert if not add.

popValidators: Should set the upper limit of the loop by the number of validators there are in the array.

swapValidators: An admin can swap indexes using the same index i.e. swapping 0 index with the 0 index.

Recommendations: Enforce swaps with indexes different from each other, i.e. swaps should be between 0 index and 1 index not 0 index and 0 index.

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