Timelock Exploit
Definition pending verification.
Timelock Exploit는 time-locking 메커니즘을 활용하는 smart contract를 대상으로 하는 vulnerability 또는 attack vector를 의미합니다. time-lock은 보안 강화를 위해 설계되었지만, 구현상의 결함이나 다른 protocol과의 상호작용으로 인해 exploit이 발생할 수 있습니다. 일반적인 시나리오 중 하나는 front-running입니다. 공격자는 time-locked contract에서 자산을 잠금 해제하려는 transaction을 관찰하고, 더 높은 gas fee를 포함한 자신의 transaction을 먼저 처리되도록 제출하여 효과적으로 자산을 가로챕니다. 또 다른 vulnerability는 잘못된 timestamp 처리에서 비롯될 수 있습니다. contract가 block.timestamp에 의존하고 miner가 특정 범위 내에서 timestamp를 조작할 수 있다면 (상당한 이득을 위해 exploit하기는 어렵지만), 공격자가 이를 악용할 수 있습니다. time-lock contract가 더 크고 복잡한 시스템의 일부이고 다른 구성 요소의 vulnerability가 간접적으로 time-lock의 의도된 보안을 우회할 수 있게 하는 경우에도 exploit이 발생할 수 있습니다. 여기에는 re-entrancy attack, 관련 조건을 영향을 미치는 [oracle manipulation](/ko/terms/oracle-manipulation), 또는 contract의 state transition에서의 logic error로 인해 조기 해제 또는 무단 액세스가 허용되는 경우가 포함될 수 있습니다.
graph LR
Center["Timelock Exploit"]:::main
Pre_cryptography["cryptography"]:::pre --> Center
click Pre_cryptography "/terms/cryptography"
Rel_advanced_propulsion_systems["advanced-propulsion-systems"]:::related -.-> Center
click Rel_advanced_propulsion_systems "/terms/advanced-propulsion-systems"
Rel_von_neumann_architecture["von-neumann-architecture"]:::related -.-> Center
click Rel_von_neumann_architecture "/terms/von-neumann-architecture"
Rel_undercollateralized_lending["undercollateralized-lending"]:::related -.-> Center
click Rel_undercollateralized_lending "/terms/undercollateralized-lending"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 5살도 이해할 수 있게 설명
타이머가 끝나기 전에 저금통을 여는 비밀 방법을 누군가가 찾아내는 것과 같습니다. 당신을 속이거나 그들이 가지고 있지 않아야 할 특별한 열쇠를 사용하는 것과 같습니다.
🤓 Expert Deep Dive
Timelock exploits often exploit the asynchronous and observable nature of blockchain transaction pools (mempools). Front-running is a prime example, where an attacker monitors the mempool for transactions interacting with time-locked contracts (e.g., claiming rewards, unlocking funds) and submits a competing transaction with a higher gas price to ensure it gets mined first. This is particularly relevant in DeFi protocols where timely execution is critical. Exploits related to timestamp manipulation are less common due to the difficulty of consistently influencing block.timestamp within acceptable consensus bounds. However, logic flaws within the contract itself, such as improper state management or insufficient access controls around the unlock function, can be more severe. For instance, if a contract allows anyone to call the unlock function after the time has passed, but fails to properly verify the caller or the state, it can be exploited. Re-entrancy attacks are less directly related to the time-lock mechanism itself but can be devastating if the contract performs external calls after verifying the time lock but before updating its internal state.