Stader Labs - JGcarv's results

Decentralized ETH liquid staking protocol with 4 ETH bond for anyone to be a node operator.

General Information

Platform: Code4rena

Start Date: 02/06/2023

Pot Size: $100,000 USDC

Total HM: 15

Participants: 75

Period: 7 days

Judge: Picodes

Total Solo HM: 5

Id: 249

League: ETH

Stader Labs

Findings Distribution

Researcher Performance

Rank: 5/75

Findings: 2

Award: $6,138.27

🌟 Selected for report: 1

🚀 Solo Findings: 1

Findings Information

🌟 Selected for report: JGcarv

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
selected for report
sponsor confirmed
M-03

Awards

6119.6969 USDC - $6,119.70

External Links

Lines of code

https://github.com/code-423n4/2023-06-stader/blob/main/contracts/PermissionlessNodeRegistry.sol#L183 https://github.com/code-423n4/2023-06-stader/blob/main/contracts/PermissionedNodeRegistry.sol#L254

Vulnerability details

Impact

The OPERATOR role holds a lot of power within the system, which can compromise the both the system integrity and it's permission-less nature.

Proof of Concept

The OPERATOR key is responsible for confirming marking each validator submitted key as either valid or invalid, without any assurance to validators.

  1. Arbitrary negation of participation makes permissionless pool permissioned. The documentation states:

Any validator in permissionless pool can run a node with 4 ETH + 0.4 ETH worth of SD token.

Which is not strictly true, since any participant in the system must be vetted by the OPERATOR, which can arbitrarily mark as invalid or frontrun key without the need to provide justification or having an appeal system. Alternatively, the OPERATOR can simple ignore the added key and never mark it as ready to deposit.

Therefore, the pool can't be considered permissionless, since participants must rely on the benevolence of the OPERATOR to participate.

  1. Authorization of invalid keys There is no way for the smart contract system to check or confirm that a given public key is really legit, and could generate income to ETHx holders, so the system relies solely on the OPERATOR to make that distinction, rendering the system vulnerable in case of a comprised wallet.

Tools Used

Manual Review

There is no simple fix for the issue, but at minimum, the protocol shouldn't be advertised as permissioneless.

Assessed type

Rug-Pull

#0 - c4-judge

2023-06-14T19:17:23Z

Picodes changed the severity to 2 (Med Risk)

#1 - manoj9april

2023-06-20T08:18:29Z

Thank you pointing it out. We will move this logic to oracle.

#2 - c4-sponsor

2023-06-20T08:18:36Z

manoj9april marked the issue as sponsor confirmed

#3 - Picodes

2023-07-02T10:03:14Z

Keeping Med severity considering this could be an instance of "function of the protocol or its availability could be impacted"

#4 - c4-judge

2023-07-02T10:05:13Z

Picodes marked the issue as satisfactory

#5 - sanjay-staderlabs

2023-07-13T04:17:50Z

This is fixed

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