Skip to content
Access control Audit finding Intermediate

Timelock and events for governor functions

The report notes that several administrative functions in the OverlayV1Mothership contract lack timelocks and events, meaning critical parameter changes can occur instantly without warning. An attacker who gains admin access could make immediate, unnoticed changes to the system.

pauliax Follow

Originally disclosed on Code4rena

Submitted by pauliax

Impact

There are contracts that contain functions that change important parameters of the system, e.g. OverlayV1Mothership has setOVL, initializeMarket, disableMarket, enableMarket, initializeCollateral, enableCollateral, disableCollateral, adjustGlobalParams. None of these functions emit events, nor they are timelocked. Usually, it is a good practice to give time for users to react and adjust to changes.

A similar issue was submitted in a previous contest and assigned a severity of Medium: https://github.com/code-423n4/2021-09-swivel-findings/issues/101

Recommended Mitigation Steps

Consider using a timelock for critical params of the system and emitting events to inform the outside world.

realisation (Overlay) commented:

The plan has been to have a timelock at some point in the protocol. Probably on whatever is the admin for the mothership. But this just had to be evaluated. It might be on the market contract itself, or on the addresses granted the role of admin.

mikeyrf (Overlay) commented:

duplicate #64

dmvt (judge) commented:

I’m removing the duplicate in this case because issue #64 refers exclusively to the events. This issue is focused primarily on the lack of governance timelock, which has traditionally been considered a medium severity issue.

The original report as published on Code4rena, by pauliax. 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

Impact

An attacker with admin access could make immediate, unannounced changes to critical system parameters, potentially harming users who have no time to react.

What the attacker needed

Admin access to the contract

The fix

The functions should be fixed by adding a timelock for critical parameters and emitting events to inform the outside world.

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 timelock is a delay before a change takes effect, giving users time to react. Without it, an admin can change important settings instantly and without any public record, which is risky if the admin account is compromised.

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 pauliax

View all

16 more disclosed reports, best first.

More from Overlay Protocol contest

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.