Skip to main content

Overview

Builder codes allow developers and builders to receive fees on orders they send on behalf of users. This enables builders to monetize their applications while providing value to traders.
The term “builder” refers to DeFi builders who build applications on Token Layer, not block builders within consensus.

How Builder Codes Work

Fee Mechanism

Builder codes enable builders to:
  1. Facilitate orders on behalf of users through their application
  2. Earn a fee on each order they process
  3. Set fees per-order for maximum flexibility

User Approval Required

Users must explicitly approve a maximum builder fee for each builder before the builder can charge fees
  • Users have full control over which builders can charge fees
  • Users can see the maximum fee a builder may charge
  • Users can revoke permissions at any time

Technical Implementation

Onchain Processing

Builder codes are processed entirely onchain as part of the fee logic
This ensures:
  • Transparency in fee calculations
  • Trustless execution
  • Verifiable fee distribution

Per-Order Flexibility

Builders can set fees per-order, allowing for:
  • Dynamic pricing based on order size
  • Different fees for different types of orders
  • Promotional pricing for certain users
  • Volume-based discounts

Use Cases

Trading Bots

Build automated trading bots that:
  • Execute strategies on behalf of users
  • Charge a fee per trade
  • Provide value through automation and optimization

Portfolio Management Tools

Create applications that:
  • Rebalance portfolios automatically
  • Charge fees for management services
  • Optimize tax efficiency

Social Trading Platforms

Develop platforms where:
  • Expert traders create strategies
  • Followers execute the same trades
  • Builders earn fees on follower trades

Aggregators

Build aggregation services that:
  • Find best prices across multiple chains
  • Route orders optimally
  • Charge fees for routing services

Custom UIs

Create specialized interfaces that:
  • Cater to specific user segments
  • Provide unique features or UX
  • Monetize through builder fees

Setting Up Builder Codes

Requirements

To implement builder codes, you need:
  1. API Integration: Integrate with Token Layer’s API
  2. User Approval Flow: Implement a way for users to approve your builder fee
  3. Fee Logic: Determine how you’ll calculate fees per order

Implementation Steps

1

Register as a Builder

Contact Token Layer to register your builder code
2

Integrate API

Use the trade endpoints with your builder code parameter
3

Request User Approval

Implement UI for users to approve your maximum fee
4

Process Orders

Send orders on behalf of users with your builder code
5

Earn Fees

Automatically receive fees as orders are executed

Fee Guidelines

Competitive Fees

Consider market rates when setting builder fees:
  • Simple execution: 5-10 bps
  • Advanced strategies: 10-25 bps
  • Premium features: 25-50 bps

Transparency

Always be clear about your fees upfront. Users appreciate transparency and are more likely to approve fair fees.
Display to users:
  • Maximum potential fee
  • Typical fee ranges
  • Value you’re providing
  • How to revoke access

User Permissions

Approval Process

Users approve builder fees through:
  1. Maximum Fee Setting: Users set the maximum fee you can charge
  2. Scope: Approval can be for all trades or specific tokens
  3. Duration: Users control how long approval lasts

Revocation

Users can revoke builder permissions:
  • Instantly: Takes effect immediately
  • No exit penalty: Users can leave at any time
  • Full control: Users own their funds and relationships

API Integration

Trade Endpoints

When sending trades with builder codes, use:

Example Request

{
  "token_id": "token_123",
  "amount": 1000,
  "side": "buy",
  "builder_code": "YOUR_BUILDER_CODE",
  "builder_fee_bps": 10
}

Fee Distribution

Receiving Fees

Builder fees are:
  • Automatically deducted from each order
  • Sent to your builder account
  • Claimable once they exceed the minimum threshold
  • Trackable in real-time

Claiming Process

1

Accrue Fees

Fees accumulate as users trade through your app
2

Monitor Balance

Track earnings at app.tokenlayer.network/earn
3

Claim

Claim once balance exceeds $1
4

Receive

Fees are added to your spot balance

Best Practices

Provide Real Value

Users will only approve builder fees if you provide clear value
Focus on:
  • Superior execution quality
  • Unique features or insights
  • Time-saving automation
  • Better prices or lower slippage

Competitive Pricing

  • Research competitor fees
  • Start with lower fees to attract users
  • Increase fees as you prove value
  • Consider volume discounts for power users

Clear Communication

  • Explain what users get for the fee
  • Show fee calculations before execution
  • Provide receipts after trades
  • Be responsive to user questions

Maintain Trust

  • Never charge more than approved maximum
  • Honor user revocations immediately
  • Keep user funds secure
  • Be transparent about any issues

Example Applications

DeFi Dashboard Builder

Value Proposition: All-in-one interface for Token Layer with advanced charting Builder Fee: 8 bps per trade Revenue Model: 100,000dailyvolume=100,000 daily volume = 80/day in fees

Copy Trading Platform

Value Proposition: Follow top traders automatically Builder Fee: 15 bps on follower trades Revenue Model: 100 users × 1,000/day×15bps=1,000/day × 15 bps = 150/day

Telegram Trading Bot

Value Proposition: Trade directly from Telegram Builder Fee: 10 bps per trade Revenue Model: 500 users × 500/day×10bps=500/day × 10 bps = 250/day

Compliance Considerations

As a builder earning fees:
  • You may be providing a financial service in certain jurisdictions
  • Understand your local regulations around:
    • Payment processing
    • Financial services
    • Securities (if applicable)
    • Tax reporting
Consult with legal counsel about your specific builder application and jurisdiction

Support for Builders

Resources

  • API Documentation: Complete reference for integration
  • Builder Community: Discord channel for builders
  • Technical Support: Dedicated support for integration questions

Getting Started

Interested in building with builder codes?
  1. Join the Token Layer Discord
  2. Review the API documentation
  3. Contact us at builders@tokenlayer.network

Questions?

For more information about builder codes, contact us at builders@tokenlayer.network.