Inspiration
Motivation
Most staking contracts introduce unstaking latency through design choices such as cooldown periods, epoch boundaries, or delayed state transitions. These mechanisms often persist even after the underlying time lock has already expired, creating unnecessary UX friction and capital inefficiency.
This project explores whether unstaking can be made strictly time-correct, such that a user can exit a position in the first valid block following lock expiration, without relying on off-chain coordination or protocol-specific grace periods.
What it does
System Design
The system implements a block-accurate staking model with the following properties:
Time locks enforced exclusively via block.timestamp
No epochs, cooldowns, or delayed withdrawal queues
Immediate unstaking eligibility once the unlock condition is satisfied
Atomic execution via a smart account abstraction (EIP-7702-style)
The design ensures that unstaking availability is a direct function of on-chain time, rather than higher-level protocol logic.
How we built it
Core Mechanism
Each stake records an unlock timestamp:
𝑡 unlock =𝑡stake + Δ𝑡
t unlock = t stake +Δt
Unstaking is permitted when:
block.timestamp ≥ 𝑡 unlock block.timestamp≥t unlock
This condition is evaluated within the same transaction that performs the withdrawal. No intermediate states or delayed settlement steps exist.
Because BSC offers fast block times and reliable timestamp progression, the unstake transaction can be included in the first block where the condition becomes true.
Challenges we ran into
Preventing off-by-one timing assumptions at the unlock boundary
Ensuring deterministic behavior under variable block inclusion timing
Modeling EIP-7702 behavior in a hackathon-appropriate scope
Balancing minimalism with extensibility
Accomplishments that we're proud of
To support precise execution and improved UX, the unstake call can be executed through a smart account compatible with EIP-7702 semantics.
This enables:
Atomic execution of the unstake call
Compatibility with bots or relayers targeting the first eligible block
Separation of user intent from execution timing
Elimination of race conditions between eligibility checks and state updates
Although simplified for this implementation, the smart account model mirrors real-world EIP-7702 delegation patterns.
What we learned
Precise unstaking does not require protocol complexity—only correct time evaluation
Most unstaking delays are UX-level artifacts rather than technical constraints
Smart accounts significantly improve execution reliability near boundary conditions
Designing for verifiability simplifies both testing and auditing
What's next for TimeLock Zero
TimeLock Zero is a block-accurate staking system that enables instant unstaking in the first valid block after a time lock expires. Unlike traditional staking designs, it introduces no cooldowns, epochs, or artificial delays, ensuring that unstake eligibility is determined solely by on-chain time.
The system enforces locks using block.timestamp and allows withdrawal the moment the unlock condition becomes true. Unstaking is executed atomically, optionally via a smart account compatible with EIP-7702 semantics, improving execution reliability and enabling automation, relayers, and gas abstraction.
Built on BSC Testnet, TimeLock Zero leverages fast block inclusion to reliably achieve first-block exits. The contract logic is intentionally minimal, reducing surface area and making correctness easy to verify and audit.
The project demonstrates that most unstaking latency is a design choice rather than a technical limitation. By aligning protocol behavior strictly with time-based constraints, TimeLock Zero improves capital efficiency, user trust, and protocol transparency.
Future development focuses on native EIP-7702 integration, automated first-block execution, MEV-aware unstaking, multi-asset support, and formal verification—while preserving the core invariant: zero-delay unstaking.
Log in or sign up for Devpost to join the conversation.