code.markets / docs Open platform ↗

Code Markets documentation

From repository
to market.

A guide to repository tokens, launching from your terminal, and the keys that connect GitHub to your wallet.

Code Markets lets you launch a market for a public GitHub repository. A market has its own token and an on-chain liquidity pool. Your GitHub identity and repository key establish who can launch it; the market token is the asset people trade.

Launch your repository

01 / Understand the market

Market dynamics

One repository token, a selected pairing asset

At launch, the repository receives a market token with a name, ticker, image, and supply. Its pool pairs that token with a supported asset, also called the numeraire. The selected deployment lists available pairings: these can include WETH, tokenized stocks such as AAPLc, and FREECODE on Base. Chain and pairing choices belong to the launch and are retained when you resume it.

Liquidity and price movement

The launch configures token supply for sale and liquidity across price ranges. A buy exchanges the pairing asset for repository tokens; a sell exchanges repository tokens for the pairing asset. Trades change the pool's balance and price. Larger trades relative to available liquidity generally move the execution price further. A displayed spot price is a reference; your quote describes the trade you are about to make.

The pairing asset also has its own value. A repository token's price in that asset and its displayed dollar price can therefore move differently.

Quotes, approvals, and execution

Choose buy or sell, enter an amount, and review the quote, fees, and minimum received before approving. Slippage tolerance sets how far execution may move from the quote; the transaction must satisfy its minimum output. Token spending may require approvals before the swap. Confirm the requested wallet actions and wait for on-chain confirmation to see the completed trade.

Where trading fees go

Pool fees accrue as trades execute. The launch terms define the fee schedule and recipient shares, including the RIK holder, FreecodeFund, and Doppler. Some launches start with a fee that decreases over time; the applicable schedule depends on the deployment. Review the launch preview and the market's fee details for its actual rates and split.

The repository royalty share is routed through the repository's splitter and collected by the current RIK holder. Where a launch uses an additional Rehype fee, that fee is routed to the FreecodeFund treasury. Fee income depends on trading activity; the site does not promise a fixed return.

Creator allocation and vesting

A launch can reserve tokens for the creator while making the remaining sale supply available to the pool. The preview shows the allocation recipient, amount, vesting duration, and any cliff before submission. Vesting makes tokens available over the configured schedule, and vested tokens can be claimed.

02 / Launch from the terminal

Deploy a repo market

Start in a local checkout of a public GitHub repository you control. Install Git and the GitHub CLI, and sign in to GitHub with gh auth login. Use npm to install the markets executable:

npm install --global @codemarkets/markets
cd my-project
markets auth login
markets doctor
markets launch --dry-run

markets auth login establishes GitHub authentication and a platform session. Wallet sign-in happens in the browser: follow the terminal's request and confirm the displayed code. The session is stored in your operating system's credential store. markets doctor checks launch prerequisites; --dry-run plans the launch without writing registrations or submitting transactions.

Configure, review, and approve

markets launch
  1. Choose the market. The browser form shows the repository detected from your checkout. Choose an enabled chain and pairing token. Base uses chain ID 8453; Robinhood uses 4663 when its deployment is enabled.
  2. Set up the token. Check its name and ticker and upload a PNG, JPEG, or WebP image up to 3 MB. The form supports cropping and resizes the result to at most 512 × 512 pixels. Story, team, and links are optional.
  3. Review the terms. Check the launch preview, including creator allocation, vesting, and recipients. Continue launch to return the accepted configuration to the terminal.
  4. Establish the keys. The CLI resolves your identity and repository registration, guiding you through the applicable control proof. Existing registrations are reused.
  5. Approve and confirm. The CLI pins the token image and metadata and submits the authorized launch. An external wallet may need a separate browser transaction approval. The command finishes when the market is confirmed on chain.

Watch progress or resume

markets status --watch
markets launch

Use status --watch to follow remote progress until it settles. If you close the browser or interrupt the terminal, rerun markets launch and choose Resume. Accepted configuration and chain/pairing choices are retained. Rerunning reconciles the operation with on-chain state; a repository market already launched or launching is reused.

Launch without configuration prompts

First establish a valid platform session with markets auth login. Supply an image and explicit chain and pairing for an unattended run:

markets launch --chain 8453 --numeraire AAPLc --image ./token.png --non-interactive

The pairing must be offered by the selected deployment. Without chain and pairing flags, a new unattended launch defaults to Base and WETH. An existing operation keeps its saved choices. Unattended runs resume automatically and report required input instead of prompting; any wallet approval requirements still apply.

03 / Know your keys

Identity & repositories

UIK · your identity

The User Identity Key identifies a GitHub user. Its token ID is the numeric GitHub user ID, and registration binds it to a wallet.

RIK · the repository

The Repository Identity Key identifies a repository by its numeric GitHub repository ID. Its current holder authorizes the market launch.

How the relationship is established

  1. The CLI resolves the signed-in GitHub principal, platform session, wallet, and public repository.
  2. It looks up the UIK using the GitHub user ID. If registration is needed, it creates a GitHub registration issue associating that user ID with the wallet and waits for the binding. An existing key bound to the same wallet is reused. If another wallet holds it, resolve that identity binding before continuing.
  3. It looks up the separate RIK using the repository ID. For a new registration, repository control is verified through the applicable direct owner, GitHub App, or repository topic challenge path. A required topic challenge is installed before creating the registration issue.
  4. Registration binds the repository key to the wallet. The launch checks the current RIK holder before preparing and authorizing the market transaction.

Numeric IDs identify the GitHub user and repository; names and slugs provide readable labels. A UIK represents the user, a RIK represents control of the repository's market launch and royalty collection, and a market token is traded in its liquidity pool. Holding market tokens does not make you the RIK holder.

Keep going

Resources