The current design of the LendingPool
contract allows its owner to make immediate changes to critical parameters without any delay mechanism or timelock. These parameters include, among others, liquidationThreshold
, healthFactorLiquidationThreshold
, liquidityBufferRatio
, and the ability to pause withdrawals. Because there is no enforced waiting period or governance check before these modifications take effect, the protocol’s risk profile can be altered abruptly at the owner’s discretion. This design places a high degree of trust in the owner and can potentially expose users to unexpected changes in system behavior, such as sudden shifts in liquidation rules or fee policies.
Under the current implementation of the LendingPool
contract, the owner is able to change critical parameters—such as liquidationThreshold
, healthFactorLiquidationThreshold
, liquidityBufferRatio
, and others—at any time, with no enforced waiting period or timelock mechanism. This creates an environment in which users have no advance notice of adjustments that could drastically alter liquidation conditions, interest rates, or other foundational protocol rules.
Because these changes take effect immediately, stakeholders face heightened risk if the owner acts maliciously or if the owner’s key is compromised. The absence of a timelock or multi-signature governance means that even a single transaction can profoundly impact user positions—potentially triggering sudden liquidations or making unexpected modifications to withdrawal policies. While a future transition to a TimelockController
is mentioned, the current state of the contract grants unrestricted power to the owner to modify essential protocol parameters without user input or delay.
Because the owner can change critical parameters without any delay or checks, users of the protocol are exposed to sudden alterations in liquidation thresholds, debt repayment rules, or interest policies. Such abrupt changes could trigger unexpected liquidations, significantly alter the borrowing costs, or otherwise disrupt normal protocol operations. Moreover, if an attacker gains control of the owner’s private key, they could exploit these immediate modifications for personal gain—potentially compromising user funds, destabilizing the protocol, and eroding stakeholder confidence.
Below is a concise demonstration showing how the LendingPool
contract’s owner can instantaneously modify key parameters—such as liquidationThreshold
or healthFactorLiquidationThreshold
—without passing through any scheduling or timelock process. This proof highlights the immediate impact such changes can have on user positions and overall protocol stability.
Below is a summarized excerpt from the relevant section of the LendingPool
contract, illustrating how the setParameter
function executes without any required delay (i.e., no timelock). In this example, the onlyOwner
modifier alone allows the owner to instantly modify critical values.
The snippet above shows that the owner
(enforced by the onlyOwner
modifier) can instantly apply changes to key parameters such as liquidationThreshold
. No timelock or additional confirmation process is required before these changes take effect.
As a result, the owner
can adjust parameters like liquidation rates or user health factors without warning, potentially affecting all borrowers and the protocol at once. This contrasts with the presence of a TimelockController
contract that does not actually control the LendingPool
, since it is not recognized as the contract’s owner.
Below is a collection of research and documentation demonstrating that the absence of a timelock is not merely a “design choice” or a matter of trusting the owner. Instead, it carries substantial security and user-confidence implications, as repeatedly underscored in DeFi best practices, official documentation, and real-world examples of governance exploits.
Many popular DeFi protocols use Timelock contracts to delay the execution of critical changes in their smart contracts. This adds a layer of security, as any modification (such as upgrading contracts or parameters) remains pending for a fixed period before taking effect. Notable examples include:
Compound – Utilizes a Timelock contract with a minimum delay of 2 days for any governance-approved proposal. After passing an on-chain 3-day voting process, proposals are queued in the Timelock and executed 2 days later, ensuring that any protocol changes take at least a week to complete. In fact, all core Compound contracts are controlled by a Timelock that applies this “time-delayed, opt-out” upgrade pattern (Compound v2 Docs | Governance).
Uniswap – Uniswap (UNI) governance also employs a Timelock. All administrative or governance actions must sit in a Timelock for at least 2 days before execution (Glossary | Uniswap). The typical process includes a 2-day waiting period, a 7-day voting window, and then 2 additional Timelock days before the proposal is implemented (Process - Uniswap Docs).
Aave – Aave’s governance framework requires successful proposals to pass through a Timelock whose delay depends on the type of change. For instance, standard proposals are delayed by ~1 day, while more sensitive changes (via the “Long Executor”) experience a 7-day delay before execution (Governance | Aave Protocol Documentation). This allows the community to react to high-impact adjustments.
MakerDAO – Maker uses the Governance Security Module (GSM), which is effectively a 24-hour Timelock on governance changes. When MKR holders approve an executive proposal (a “Spell” contract), the modifications do not take effect immediately but are delayed by 24 hours through the GSM. This delay provides time to trigger Emergency Shutdown if a malicious proposal is passed, protecting the system (Sai Whitepaper).
Other Examples – Many other protocols follow this pattern. SushiSwap, for instance, incorporated the same Timelock contract used by Compound/Uniswap into its system after its tumultuous early weeks (SushiSwap Explained!). On PancakeSwap (BSC), developers implemented a ~6-hour Timelock for any changes to the protocol, so every adjustment is announced and delayed before execution, giving the community time to respond (CertiK - What is a Timelock?). Generally, implementing Timelocks in treasury contracts, liquidity pools, and governance modules has become standard practice for top-tier DeFi protocols.
Timelock implementation is widely recommended by blockchain security experts and technical documentation of smart contracts, especially for administrative or governance functions:
Community Protection: Security analysts emphasize that Timelocks protect users from hostile governance changes by introducing a mandatory delay before execution. This gives participants time to review the change and, if necessary, exit the protocol before an unfavorable proposal is implemented. As a result, a minority (e.g., a whale with large voting power) cannot unilaterally push decisions without giving users a chance to react (Best Practices For Secure DeFi Governance).
Mitigating Governance Attacks: Including a Timelock is considered good practice to withstand flash-loan governance attacks or other tactics of governance capture. For example, Compound and Uniswap calculate voting power using balance snapshots before voting to prevent flash manipulations; even so, the Timelock adds an extra security layer by preventing immediate execution in the event someone manages to pass something malicious (Best Practices For Secure DeFi Governance). OpenZeppelin points out that Timelocks add a “queue” step in the governance workflow: every approved proposal must first be queued in the Timelock and wait the delay before its execute
function can be called (Governance - OpenZeppelin Docs). This has become an essential component of on-chain governance frameworks (like Governor Bravo, OpenZeppelin Governor, etc.).
Audit Results and Official Documentation: Past audits often recommend adding Timelocks if they detect that critical owner/admin functions can be executed without delay. The absence of a time buffer is considered a risk because stealthy, rapid changes can undermine user transparency and confidence (Missing events/timelocks for owner/admin only functions that change critical parameters · Issue #85 · code-423n4/2021-08-floatcapital-findings · GitHub). Hence, DeFi project audits have explicitly advised introducing time delays for critical parameter changes as a mitigation measure (Missing events/timelocks for owner/admin only functions that change critical parameters · Issue #85 · code-423n4/2021-08-floatcapital-findings · GitHub). In short, both the technical literature and security blogs (e.g., Halborn, CertiK) highlight that a well-configured Timelock is a key security piece in admin-controlled contracts (Best Practices For Secure DeFi Governance) (Best Practices For Secure DeFi Governance).
Not having a Timelock on administrative or governance functions has led to severe vulnerabilities and exploits in multiple protocols. Some cases and their consequences:
Beanstalk Attack (April 2022): Beanstalk—a DeFi protocol for an algorithmic stablecoin—was hacked for ~$181 million due to the lack of an execution delay in its governance (Web3-Security-Library/HackAnalyses/README.md at main · immunefi-team/Web3-Security-Library · GitHub). The attacker took out a flash loan to gain a majority of governance tokens in one block and passed a malicious proposal that drained the protocol’s funds immediately, with no time buffer (Web3-Security-Library/HackAnalyses/README.md at main · immunefi-team/Web3-Security-Library · GitHub). The exploit succeeded because there was no Timelock delaying execution post-voting, preventing the community or devs from reacting. Beanstalk responded by abandoning on-chain governance and switching to a community multisig to avoid instant executions (Web3-Security-Library/HackAnalyses/README.md at main · immunefi-team/Web3-Security-Library · GitHub).
Rug Pulls and Insider Malice: The lack of a Timelock also enables scams by developers or the compromise of private keys. In many forked DEX and yield-farm projects (especially during the 2020-21 DeFi boom), master contracts (MasterChef or pool controllers) had no Timelock, letting the owner change code or move funds instantaneously. For instance, some projects with an active “migrator” function and no Timelock allowed the dev to redirect user liquidity to their own address in a single block, performing an instant rug pull. Community auditors note that the absence of a Timelock is a huge “red flag”: a 1-of-3 multisig controlling the bulk of tokens/funds makes a “massive rug pull incredibly easy” (ClayStack | Magnify #13 — Curve Wars: Under “Emergency” Regulation?). In the case of Mochi (involved in the Curve Wars), it was discovered that the team held 99.5% of the token supply in a 1/3 wallet with no Timelock, meaning they could instantly withdraw or manipulate funds—an alarming security flaw that prompted community intervention (ClayStack | Magnify #13 — Curve Wars: Under “Emergency” Regulation?).
Admin Key Compromise: Even without malicious intent from the team, the lack of a Timelock leaves the protocol open to attacks if the admin key is hacked. An attacker who gains control of the admin account in a protocol with no delay can upgrade contracts or drain assets at once. This is not hypothetical: auditors frequently point out in their reports that without a Timelock, nothing prevents a malicious admin (or a hacker who steals the key) from updating the contract to drain all tokens and executing that transaction immediately (Severe rugging opportunity for owner to claim all approved NFTs and WETH. · Issue #374 · code-423n4/2022-10-blur-findings · GitHub). Multiple incidents in 2022-2023 involved compromised admins; those protocols lacking a Timelock suffered faster and more difficult-to-mitigate losses, as there was no time window to respond. In short, not implementing a Timelock can lead to user fund losses, liquidity drains, and severe reputational damage—risks illustrated by real exploits in DeFi history.
Security strategies for protocol governance and administration vary. Below is a comparison of using Timelocks versus other measures such as multisigs, fully decentralized governance, or strict access controls:
Timelock (On-Chain Governance): This approach is typically more decentralized and transparent when combined with community voting. No administrative action can happen without being announced and waiting for the predefined delay, which bolsters user trust. Its drawback is slowness: emergency actions cannot be applied instantly. For that reason, some protocols with a Timelock also include pause modules or guardians to freeze the protocol swiftly in a hack, while the Timelock ensures no stealth changes under normal conditions. Examples: Compound, Uniswap, Aave, MakerDAO (each with specific delays). These projects sacrifice speed for security and community protection.
Multisig (Without Timelock): Many early-stage protocols or smaller communities opt for an N-of-M multisig for upgrades and parameter changes. This can be more agile, as the signers (typically core devs or trusted community members) can execute changes as soon as all sign, with no time counter. It’s a social-trust-based security model: it requires trusting that none of the signers will act maliciously. The criticism is that if signers collude or are compromised, there is no enforced delay, allowing drastic or instant theft (ClayStack | Magnify #13 — Curve Wars: Under “Emergency” Regulation?). The Mochi example shows this risk: a 1/3 multisig (effectively central control) with no Timelock that almost enabled a massive rug pull (ClayStack | Magnify #13 — Curve Wars: Under “Emergency” Regulation?). Yearn Finance is a well-known example that relies on a 6-of-9 multisig for changes instead of tokenized governance; they’ve stated they do not require a Timelock because of the distributed responsibilities in the multisig plus other safeguards (Yearn - detailed report | DeFiSafety). This hybrid approach is more centralized but can respond swiftly to vulnerabilities—e.g., disabling a compromised contract within minutes if the signers agree, instead of waiting days. Some projects combine both mechanisms: a multisig as the owner of the Timelock, meaning signers can propose changes, but there’s still the programmed delay before execution. This grants some speed (the multisig can propose quickly) and a measure of security (the Timelock enforces transparency and delay).
Fully Decentralized Governance (No Direct Admins): Protocols like certain DEXs (e.g., Uniswap V2) took the route of no active admin key—the contracts are immutable or the upgradable functions have been renounced. In these extreme cases, there’s literally no way to make quick changes: the only option for alterations is deploying new versions. This approach removes the need for a Timelock because there is nothing to delay (zero centralized control). While it’s maximum in decentralization and eliminates the possibility of admin malfeasance, it can be dangerous if bugs are found, since you can’t fix them quickly other than urging users to migrate to a new contract. Many immutable protocols still feature emergency modules (e.g., a Pause Guardian in Compound (Compound v2 Docs | Governance) or an Emergency Shutdown in Maker) for critical situations, but overall this approach prioritizes immutability. In contrast, protocols that maintain active but secure administration try to find a middle ground—for instance, MakerDAO has control over financial parameters via MKR voting plus a 24h GSM timelock, and also includes emergency oracles to shut down the system if necessary. They combine on-chain delayed governance with special access controls for extreme cases.
Strict Access Controls + External Validation: Another strategy is to restrict which changes can be made and under what conditions. Some projects implement governance modules with built-in rules (e.g., disallowing certain parameters from going beyond certain ranges, or requiring dual confirmation from different contracts). This reduces reliance on human decision-making but often pairs with a Timelock or a multisig. An example is OpenZeppelin Governor + TimelockController, where the Governor (for voting) and the Timelock must both act, and you can configure separate roles (proposers, executors) to restrict who can queue or execute proposals (Governance - OpenZeppelin Docs). Other projects use a Security DAO (like Curve’s EmergencyDAO) that can veto or pause governance actions if something malicious is detected—a supplemental control beyond the standard Timelock.
In summary, protocols that adopt Timelocks tend to maximize security and decentralized decision-making, giving the community time to respond, whereas those using multisigs or other mechanisms seek greater flexibility or speed at the cost of trusting a small group or predefined rules. The DeFi trend is shifting from centralized controls (multisigs, dev keys) to Timelocks and open governance as protocols mature and gain a broader community. However, each approach has trade-offs: a long Timelock may be unsuitable during an urgent hack, whereas a multisig without a Timelock can erode user trust. For that reason, many protocols combine measures—e.g., Timelock for routine changes plus a multisig/pause for emergencies—striving for a balance of security, decentralization, and rapid response. Best practices recommend continually reassessing these mechanisms and adjusting them (e.g., increasing Timelock delays, decentralizing the multisig, etc.) as the protocol and user base evolve (Sai Whitepaper) (Best Practices For Secure DeFi Governance).
The LendingPool
contract owner decides to change the liquidationThreshold
from 80% to 50%.
Because there is no timelock or delay, calling setParameter(OwnerParameter.LiquidationThreshold, 5000)
takes effect immediately.
Users have no time to withdraw collateral or rebalance their positions, suddenly finding themselves below the new liquidation threshold.
This can trigger forced or mass liquidations, severely impacting users’ assets in a matter of seconds.
The ability to modify critical parameters without a timelock
poses a centralization risk that may adversely affect users. The code confirms the absence of any cooldown (timelock) mechanism in all onlyOwner
functions that update sensitive parameters.
Manual Code Review – The contract’s logic and implementation were carefully inspected line by line, focusing on how administrative functions are carried out, whether any delay or governance checks are applied, and identifying immediate owner-level operations. This in-depth analysis helped confirm that no timelock mechanism enforces a waiting period on the parameter changes under scrutiny.
Implement a Timelock: Administrative actions require a scheduled delay, giving users time to respond to any parameter changes.
Use Secure Governance Mechanisms: Consider a well-distributed multisig or on-chain voting process for proposing critical updates, ensuring no single entity can unilaterally alter the system without notice.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.