Protocol Documentation
0xKeep is a decentralized infrastructure protocol designed for the secure time-locking and vesting of ERC-20 assets. The system follows a "Write Once, Run Forever" architecture, meaning the smart contracts are immutable, have no administrative access keys, and function autonomously without off-chain dependencies.
Security Note
The 0xKeep protocol is non-custodial. We cannot access, freeze, or recover funds. Please ensure you manage your wallet keys and vesting schedules responsibly.
Architecture & Trust Model
The core engine (ZeroXKeepLocker.sol V12) minimizes gas usage by storing only essential data on-chain. It utilizes a "Balance-Before / Balance-After" accounting mechanism to safely handle deflationary/tax tokens without phantom locks.
No proxy patterns. No upgrade paths. The code deployed today is the code that runs forever.
There are no onlyOwner modifiers on withdrawal functions. The protocol is censorship-resistant.
Vesting calculations use a two-part integer formula to prevent overflow on tokens with large supplies (e.g. memecoins).
Withdrawn locks are removed from the user's on-chain array automatically, keeping gas costs low for future reads.
Contract Addresses
| Network | Chain ID | Address |
|---|---|---|
| Base Mainnet | 8453 | 0x49bF4Ded143402B2fD89d8d284e477Dfdc9fa02B |
| Arbitrum One | 42161 | 0xDC9bFb15C28486590Cbf58F3FEA9ADbEB9B0334c |
| Optimism | 10 | 0x1Ecf87D69c4a5c8D10ffb7D73e8ABB415043f866 |
| Base Sepolia testnet | 84532 | 0x22049F0686ff6F17d1175f0f74dF8C67F7ce50ea |
| Arbitrum Sepolia testnet | 421614 | 0xA2e1496692B41DD69291138933A9800e049c5221 |
| Optimism Sepolia testnet | 11155420 | 0xA2e1496692B41DD69291138933A9800e049c5221 |
Fees & Limits
0xKeep uses a flat-fee model paid in native ETH. Fees are hardcoded into the contract bytecode and cannot be increased.
Safety Limits
- Max Lock Duration: 100 Years (Overflow protection).
- Max Cliff Duration: 10 Years.
- Min Vesting Duration: 1 Day (enforced by contract).
Standard Lock (The Time Vault)
The Standard Lock functions as a binary "Time Vault". It is designed for Liquidity Pool (LP) tokens or strategic reserves that need to be removed from circulation entirely until a specific date.
Tokens are deposited into the contract and mapped to a unique Lock ID. Withdrawal is strictly impossible until block.timestamp ≥ unlockTime.
The lock owner can extend the duration (push the date further into the future) at any time. Dates cannot be shortened.
Linear Vesting with Cliff
Vesting schedules allow for the granular, linear release of tokens over time. This is ideal for team salaries, advisor allocations, or private sale distribution.
Claimable = (Total / Duration) × TimePassed + (Total % Duration × TimePassed) / Duration
This two-part formula avoids integer overflow on large token supplies while preserving maximum precision.
An optional initial "waiting phase" where 0 tokens are released. Vesting begins immediately after the cliff ends.
Tokens unlock every second. Owners can claim available tokens as frequently as they wish (e.g., daily, weekly).
Ownership Transfer
0xKeep recognizes that project structures change. A developer might deploy a lock from a personal wallet but later need to transfer control to a DAO Multisig.
Transfer Capabilities
- Full Transfer: The new wallet receives 100% control over the lock/vesting schedule.
- Irreversible: Once transferred, the original creator loses all access. They cannot withdraw, extend, or reclaim the lock.
- Safe Handling: The contract validates that the new owner address is not the zero address (`0x0`), preventing accidental burns during transfer.
How to Lock Liquidity
- Connect your Wallet Ensure you are connected to the correct network (Base, Arbitrum, or Optimism) via the navbar button.
- Enter Token Details Navigate to the Create page. Paste your Token Contract Address. The interface will automatically fetch the decimals.
- Configure the Lock Select the Standard Lock tab. Enter the amount of tokens (LP or Native) and choose the Unlock Date.
- Step 1: Authorization Click 1. Authorize Token. This triggers a wallet transaction allowing the 0xKeep contract to interact with your specific token amount. Wait for confirmation.
- Step 2: Initialize Lock Once authorized, click 2. Initialize Lock. This executes the transfer and generates your Lock Certificate.
Creating Vesting Schedules
Vesting allows you to distribute tokens to team members or investors over time. You must create one schedule per recipient.
- Select Vesting Mode On the Create page, click the Linear Vesting tab.
-
Set Duration & Cliff
- Duration: The time it takes for 0% to 100% of tokens to unlock.
- Cliff (Optional): A waiting period before the vesting starts.
Example: 30 Day Cliff + 365 Day Duration = First token unlocks on Day 31.
Managing Assets
Transferring Ownership
If you need to hand over control of a lock (e.g., to a DAO Multisig), go to the Certificate Page and use the Transfer Ownership control.
Withdrawing / Claiming
Standard Locks: Can only be withdrawn 100% after the unlock date passes.
Vesting: Available tokens can be claimed at any time via the "Claim Tokens" button.
Archive & History
After withdrawing a lock or completing a vesting schedule, the item remains visible in your My Vaults dashboard. You can archive it to move it out of your active view.
Archiving a Withdrawn Lock
- Withdraw your lock from the Certificate page.
- The lock appears in My Vaults with a WITHDRAWN status.
- Click Archive in the Action column.
- The lock moves to Archived Vaults.
Archiving a Completed Vesting
- After fully claiming a vesting schedule, status changes to COMPLETED.
- Click Archive in the Action column.
- The vesting moves to Archived Vaults.
| Action | My Vaults | Archived Vaults |
|---|---|---|
| Withdraw lock | ✓ Visible (WITHDRAWN) | Hidden |
| Archive | Hidden | ✓ Visible |
| Unarchive | ✓ Visible (WITHDRAWN) | Hidden |
Embed Widgets
Developers can embed a live, verifiable certificate on their own website using our iframe widget. The widget auto-updates based on on-chain data.
<iframe
src="https://app.0x-keep.xyz/embed/lock/0xK-BL-6"
width="100%"
height="220"
style="max-width: 400px; border-radius: 16px; border: none;"
></iframe>
Universal ID System
0xKeep uses a "Fancy ID" system on the frontend to uniquely identify locks and vestings across all supported chains. The format encodes the chain, the type (lock or vesting), and the raw on-chain integer ID into a single readable string.
0xK-{CHAIN}{TYPE}-{rawId}
/lock/0xK-BL-6). These URLs are permanent and resolve directly from on-chain data — no database required.