Skip to content
Business logic Audit finding Intermediate

TimeLock cannot schedule the same calls multiple times

The TimeLock contract's schedule function reverts when the same target and data are used because the transaction hash is identical, preventing identical transactions from being scheduled multiple times. An attacker could not exploit this, but it caused a functional limitation for legitimate users needing recurring payments.

cmichel Follow

Originally disclosed on Code4rena

Submitted by cmichel

The TimeLock.schedule function reverts if the same targets and data fields are used as the txHash will be the same. This means one cannot schedule the same transactions multiple times.

Imagine the delay is set to 30 days, but a contractor needs to be paid every 2 weeks. One needs to wait 30 days before scheduling the second payment to them.

Recommend also including eta in the hash. (Compound’s Timelock does it as well.) This way the same transaction data can be used by specifying a different eta.

alcueca (Yield) confirmed:

Funny, BoringCrypto was quite negative about including the eta in the txHash. At the time I couldn’t think of a reason to repeat the same call with the same data, but you are right that sometimes it might make sense, and storing off-chain the expected eta of each timelocked transaction is something you should do anyway.

I’ll confirm this issue, and will bring it for public discussion once the contest is over.

alcueca (Yield) patched:

I ended up refactoring the Timelock so that the eta is not included in the parameters, but repeated proposals are allowed.

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

Likely the transaction hash used to identify scheduled transactions did not include the execution time (eta), so identical calls produced the same hash and were rejected as duplicates.

Impact

This was a functional limitation, not a security vulnerability; it prevented scheduling identical transactions multiple times, which could delay recurring payments.

What the attacker needed

Access to schedule transactions

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 smart contract that delays actions for a set period. The bug meant you couldn't schedule the exact same payment twice because the system used a unique identifier that didn't change. This made recurring payments difficult.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by cmichel

View all

196 more disclosed reports, best first.

More from Yield Witch v2 contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.