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 V11) 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.

Contract Addresses

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 Duration: 1 Second.

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 Claimable = (TotalAmount * TimeElapsed) / Duration
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.
  3. Batch Mode (Optional) Toggle Batch Mode if you need to create schedules for multiple people at once. You can add rows for each recipient. Note: You will sign a separate transaction for each row.
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.

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-B-101" 
  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 prevent collision between chains while maintaining simple integer IDs on-chain.

0xK-B-101
Base Network, Lock ID #1
0xK-A-55
Arbitrum One, Lock ID #55
0xK-OP-200
Optimism, Lock ID #200