Skip to content
Access control Audit finding Intermediate

Admin can rug L2 Escrow tokens leading to reputation risk

The L1Escrow contract's approve function lets the admin approve any spender for any amount, so a malicious or compromised admin could steal all escrowed tokens. Even a well-intentioned admin could be tricked into calling it, damaging the protocol's reputation.

harleythedog Follow

Originally disclosed on Code4rena

Submitted by harleythedog.

The L1Escrow contract has the function approve that is callable by the admin to approve an arbitrary spender with an arbitrary amount (so they can steal all of the escrow’s holdings if they want). Even if the admin is well intended, the contract can still be called out which would degrade the reputation of the protocol (e.g. see here: https://twitter.com/RugDocIO/status/1411732108029181960). LPT is valuable on the Ethereum mainnet, so this rug vector should be mitigated. It would be best to restrict this function’s power by only allowing approvals to other trusted protocol contracts (like L1LPTGateway, which I believe uses the escrow’s approval).

NOTE: Even if the admin is under a timelock, this is still an issue, as users have to wait a whole week to withdraw from L2 -> L1 due to the dispute period.

Proof of Concept

See the approve function here

Recommended Mitigation Steps

Restrict the power of this approve function so that the admin isn’t able to steal funds. This can be accomplished by only allowing approvals to other protocol functions (instead of arbitrary approvals).

yondonfu (Livepeer) acknowledged

The original report as published on Code4rena, by harleythedog. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The approve function gives the admin unrestricted power to approve any spender for any amount, without limiting approvals to trusted protocol contracts.

Impact

A malicious or compromised admin could steal all escrowed LPT tokens, and even a well-intentioned admin could be tricked into doing so, damaging the protocol's reputation; a timelock does not fully mitigate this because users must wait a week to withdraw from L2 to L1.

What the attacker needed

Admin privileges or compromised admin key

The fix

The approve function should be restricted so that it only allows approvals to trusted protocol contracts, preventing the admin from stealing funds.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A contract holds users' tokens in escrow. The admin can tell the contract to let any address spend those tokens. If the admin's key is stolen or the admin turns bad, all tokens can be taken. Even if the admin is honest, attackers might trick them into making this call, which looks like a theft to users.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by harleythedog

View all

14 more disclosed reports, best first.

More from Livepeer Onchain Treasury Upgrade

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.