Frax Ether Liquid Staking contest - bbuddha'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: 90/133

Findings: 1

Award: $28.01

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Lines of code

https://github.com/code-423n4/2022-09-frax/blob/55ea6b1ef3857a277e2f47d42029bc0f3d6f9173/src/OperatorRegistry.sol#L42

Vulnerability details

Impact

Withdrawals have changed from BLS public keys to Eth1 addresses. Unless the withdrawal credential is set to an Eth1 address, validators will NOT be able to withdraw from the beacon chain. They need to somehow coordinate a switch from BLS pubkeys to Eth1 addresses which will be a headache and actually gives validators full ability to withdraw funds to whatever addresses they want. This even violates trust assumptions if Frax extends their validator set to include esteemed staking service providers like StakeFish, Figment, or others.

To solve this, Frax must setup a withdrawal stub contract which will receive withdrawn Ether from the beacon chain, then the OperatorRegistry must simply be changed to account for the newly formatted for the Eth1 withdrawal credential:

    bytes withdrawal_credential;
    address public timelock_address;

    constructor(address _owner, address _timelock_address, address _withdrawal_contract) Owned(_owner) {
        timelock_address = _timelock_address;
        withdrawal_credential= abi.encodePacked(byte(0x01), bytes11(0x0), _withdrawal_contract);
    }

Just need to make sure that all withdrawal contracts are maintained and kept ready for future consensus upgrades.

Super happy to see more liquid staking solutions popping up! Liquid staking is here to stay, and the more options ETH holders have, the better it is for the network :)

#0 - FortisFortuna

2022-09-27T00:44:06Z

I don't think we will be using other validator services anytime soon, and if we do, we can always replace out this contract with updated code. Right now, we plan on just rolling our own.

#1 - 0xean

2022-10-13T23:44:56Z

Downgrading to QA

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