Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Smart Contracts

Inkd is built on three upgradeable contracts deployed on Base Mainnet, plus the $INKD token. All are open-source, verified on Basescan, and controlled by Safe multisigs.

Token

$INKD0x103013851D4475d7D1610C7941E2a16534a1eB07
ChainBase Mainnet
DeployerClanker — LP auto-locked
Buy pressureProtocol fees auto-buy $INKD via InkdBuyback when $50 USDC accumulated


InkdRegistry

The core registry. Stores project ownership, metadata, and version history on-chain.

Proxy: 0xEd3067dDa601f19A5737babE7Dd3AbfD4a783e5d

Key functions

FunctionAccessDescription
createProject(name, description, license, isPublic, readmeHash, isAgent, endpoint)AnyoneRegister a new project
pushVersion(projectId, arweaveHash, versionTag, changelog)Owner or collaboratorAdd a version
transferProject(projectId, newOwner)OwnerTransfer project ownership
addCollaborator(projectId, address)OwnerGrant push access (max 50)
removeCollaborator(projectId, address)OwnerRevoke push access
setVisibility(projectId, isPublic)OwnerToggle public/private
getProject(id)AnyoneRead project metadata
getVersion(projectId, index)AnyoneRead a specific version
getVersionCount(projectId)AnyoneNumber of versions
getOwnerProjects(address)AnyoneAll project IDs for an owner

Constraints

PropertyLimit
Project nameMax 64 characters, globally unique, immutable
DescriptionMax 1024 characters
arweaveHashMust be non-empty
versionTagMust be non-empty
Collaborators per projectMax 50

Events

event ProjectCreated(uint256 indexed projectId, address indexed owner, string name, string license);
event VersionPushed(uint256 indexed projectId, string arweaveHash, string versionTag, address pushedBy);
event ProjectTransferred(uint256 indexed projectId, address indexed from, address indexed to);
event CollaboratorAdded(uint256 indexed projectId, address indexed collaborator);
event CollaboratorRemoved(uint256 indexed projectId, address indexed collaborator);
event VisibilityChanged(uint256 indexed projectId, bool isPublic);

InkdTreasury

Receives USDC payments and splits revenue between the buyback contract and the protocol treasury.

Proxy: 0x23012C3EF1E95aBC0792c03671B9be33C239D449

Revenue split

When settle(total, arweaveCost) is called by the API server:

total USDC received
├── arweaveCost ──────────────► arweaveWallet
│                               (reimburses Arweave upload cost)
└── markup = total − arweaveCost
       ├── 50% ─────────────► InkdBuyback
       └── 50% ─────────────► Treasury Safe (multisig)

Default markup: 20% (markupBps = 2000). Configurable by the Treasury owner.

Events

event Settled(address indexed settler, uint256 total, uint256 arweaveCost, uint256 toBuyback, uint256 toTreasury);
event Withdrawn(address indexed to, uint256 amount);

InkdBuyback

Accumulates USDC from protocol revenue. When the balance reaches the configurable threshold (default $50), it automatically swaps USDC for $INKD via Uniswap V3.

Proxy: 0xcbbf310513228153D981967E96C8A097c3EEd357

Properties

PropertyValue
Buyback threshold$50 USDC (configurable)
Slippage protection1% default (maxSlippageBps = 100), max 10%
DEXUniswap V3 on Base
Pool fee tier0.3%
USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Events

event Deposited(address indexed from, uint256 amount, uint256 newBalance);
event BuybackExecuted(address indexed caller, uint256 usdcIn, uint256 inkdOut);
event InkdTokenSet(address indexed token);
event ThresholdSet(uint256 oldThreshold, uint256 newThreshold);

Ownership

All contracts are controlled by Safe multisigs on Base Mainnet (2-of-2 signers required):

SafeAddressControls
DEV_SAFE0x52d288c6697044561F99e433F01cd3d5ed4638A1InkdRegistry upgrades
TREASURY_SAFE0x6f8D6adc77C732972541A89a88ecB76Dfc641d1DInkdTreasury upgrades + withdrawals
BUYBACK_SAFE0x58822722FA012Df30c37b709Fd2f70e0F83d9536InkdBuyback upgrades + $INKD recipient

Upgrade pattern

All three contracts use OpenZeppelin UUPS. Upgrades:

  • Require onlyOwner (multisig)
  • Preserve all storage
  • Are transparent on Basescan

Source code

All contracts are published at github.com/inkdprotocol/inkdprotocol under the MIT license.