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.

Immutability

No proxy patterns. No upgrade paths. The code deployed today is the code that runs forever.

No Admin Keys

There are no onlyOwner modifiers on withdrawal functions. The protocol is censorship-resistant.

Overflow-Safe Math

Vesting calculations use a two-part integer formula to prevent overflow on tokens with large supplies (e.g. memecoins).

Clean Array Management

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.

Standard Lock 0.03 ETH
Vesting Schedule 0.02 ETH

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.

Mechanism

Tokens are deposited into the contract and mapped to a unique Lock ID. Withdrawal is strictly impossible until block.timestamp ≥ unlockTime.

Extensions

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.

The Formula (Overflow-Safe Integer Math) Claimable = (Total / Duration) × TimePassed + (Total % Duration × TimePassed) / Duration

This two-part formula avoids integer overflow on large token supplies while preserving maximum precision.

Cliff Period

An optional initial "waiting phase" where 0 tokens are released. Vesting begins immediately after the cliff ends.

Block-Level Precision

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.
GUIDE 01

How to Lock Liquidity

  1. Connect your Wallet Ensure you are connected to the correct network (Base, Arbitrum, or Optimism) via the navbar button.
  2. Enter Token Details Navigate to the Create page. Paste your Token Contract Address. The interface will automatically fetch the decimals.
  3. Configure the Lock Select the Standard Lock tab. Enter the amount of tokens (LP or Native) and choose the Unlock Date.
  4. 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.
  5. Step 2: Initialize Lock Once authorized, click 2. Initialize Lock. This executes the transfer and generates your Lock Certificate.
Caution: Do not lock "Rebasing" or "Elastic Supply" tokens. The contract logic supports standard tax tokens (Deflationary), but dynamic balance updates may cause funds to become permanently stuck.
GUIDE 02

Creating Vesting Schedules

Vesting allows you to distribute tokens to team members or investors over time. You must create one schedule per recipient.

  1. Select Vesting Mode On the Create page, click the Linear Vesting tab.
  2. 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.
Caution: Do not lock "Rebasing" or "Elastic Supply" tokens. The contract logic supports standard tax tokens (Deflationary), but dynamic balance updates may cause funds to become permanently stuck.
GUIDE 03

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.

Warning: This is irreversible. Once transferred, the new wallet becomes the sole owner with rights to withdraw.

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.

GUIDE 04

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

  1. Withdraw your lock from the Certificate page.
  2. The lock appears in My Vaults with a WITHDRAWN status.
  3. Click Archive in the Action column.
  4. The lock moves to Archived Vaults.

Archiving a Completed Vesting

  1. After fully claiming a vesting schedule, status changes to COMPLETED.
  2. Click Archive in the Action column.
  3. The vesting moves to Archived Vaults.
Action My Vaults Archived Vaults
Withdraw lock✓ Visible (WITHDRAWN)Hidden
ArchiveHidden✓ Visible
Unarchive✓ Visible (WITHDRAWN)Hidden
Note: Archive state is stored locally in your browser. It is not on-chain and will not persist across devices or if you clear browser data. Certificate links remain accessible regardless of archive status.

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.

Example Implementation
<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>
HTML

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.

Format 0xK-{CHAIN}{TYPE}-{rawId}
CHAIN — B (Base), A (Arbitrum), O (Optimism), BS (Base Sepolia), AS (Arb Sepolia), OS (OP Sepolia)
TYPE — L (Lock), V (Vesting)
rawId — The on-chain integer ID (0, 1, 2…)
0xK-BL-6
Base Mainnet, Lock ID #6
0xK-AL-0
Arbitrum One, Lock ID #0
0xK-OV-3
Optimism, Vesting ID #3
0xK-BSL-0
Base Sepolia, Lock ID #0 (testnet)
0xK-ASV-0
Arbitrum Sepolia, Vesting ID #0 (testnet)
Note: Certificate links use the Fancy ID as the URL slug (e.g. /lock/0xK-BL-6). These URLs are permanent and resolve directly from on-chain data — no database required.