Anzeigemodus
Build on X Layer

Builder Codes#

Attribute onchain activity to your app or wallet with Builder Codes on X Layer.

What Are Builder Codes#

X Layer Builder Codes are an ERC-721 NFT collection where unique 16-character codes (e.g. 8k3m1v0q7z2c9a5x) identify builders onchain. Each code has a "payout address" in its metadata — this is where potential rewards are sent.

Builder Codes give you:

  • Rewards: Attribute transactions back to your app and unlock potential rewards as the program expands.
  • Analytics: Track onchain usage, user acquisition, and conversion metrics in the OKX developer portal.
  • Visibility: Apps with Builder Codes can appear in discovery surfaces like App Leaderboards and ecosystem spotlights.

Get your Builder Code: Go to the OKX developer portal, verify your address, then create your Builder Code on the Builder Code page.

How It Works#

When a transaction is sent, an ERC-8021 attribution suffix is appended to the end of the calldata. The suffix contains your Builder Code and is extracted by offchain indexers — it does not affect contract execution. No smart contract changes are required.

The suffix adds negligible gas: 16 gas per non-zero byte.

Apps typically add the suffix by configuring dataSuffix on the client that sends the transaction, or by passing it per transaction. Wallets may also append it before signing when they support Builder Code attribution directly. EOAs and ERC-7702 smart wallets are supported. ERC-4337 user operations are not yet supported.

Note: Automatic Builder Code injection is not yet available in OKX Wallet, so apps should configure dataSuffix as described in the integration guide.

Get Started#

App developers

  1. Go to the OKX developer portal, verify your address, then create your Builder Code on the Builder Code page.
  2. Follow the Integration Guide to add attribution to your app.

Wallet providers

See the Wallet Provider Guide.

Verify Attribution#

Option 1 — OKLink Explorer

  1. Look up your transaction on OKLink.
  2. The attributed builder code is displayed next to the Txn hash field.

Option 2 — Open Source Tool

  1. Open the Builder Code Validation tool.
  2. Copy and paste the transaction input data.
  3. Click Check Attribution.

Builder Code Contracts#