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
| $INKD | 0x103013851D4475d7D1610C7941E2a16534a1eB07 |
| Chain | Base Mainnet |
| Deployer | Clanker — LP auto-locked |
| Buy pressure | Protocol 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
| Function | Access | Description |
|---|---|---|
createProject(name, description, license, isPublic, readmeHash, isAgent, endpoint) | Anyone | Register a new project |
pushVersion(projectId, arweaveHash, versionTag, changelog) | Owner or collaborator | Add a version |
transferProject(projectId, newOwner) | Owner | Transfer project ownership |
addCollaborator(projectId, address) | Owner | Grant push access (max 50) |
removeCollaborator(projectId, address) | Owner | Revoke push access |
setVisibility(projectId, isPublic) | Owner | Toggle public/private |
getProject(id) | Anyone | Read project metadata |
getVersion(projectId, index) | Anyone | Read a specific version |
getVersionCount(projectId) | Anyone | Number of versions |
getOwnerProjects(address) | Anyone | All project IDs for an owner |
Constraints
| Property | Limit |
|---|---|
| Project name | Max 64 characters, globally unique, immutable |
| Description | Max 1024 characters |
arweaveHash | Must be non-empty |
versionTag | Must be non-empty |
| Collaborators per project | Max 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
| Property | Value |
|---|---|
| Buyback threshold | $50 USDC (configurable) |
| Slippage protection | 1% default (maxSlippageBps = 100), max 10% |
| DEX | Uniswap V3 on Base |
| Pool fee tier | 0.3% |
| USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
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):
| Safe | Address | Controls |
|---|---|---|
| DEV_SAFE | 0x52d288c6697044561F99e433F01cd3d5ed4638A1 | InkdRegistry upgrades |
| TREASURY_SAFE | 0x6f8D6adc77C732972541A89a88ecB76Dfc641d1D | InkdTreasury upgrades + withdrawals |
| BUYBACK_SAFE | 0x58822722FA012Df30c37b709Fd2f70e0F83d9536 | InkdBuyback 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.
