Back to Home

Build Your Own Donut Shop

Deploy your own frontend and earn 5% of all mining fees

Earn Passive Income

Every mining transaction through your Donut Shop earns you 5% in ETH. Build once, earn forever.

5%
of every purchase
Lifetime earnings
0
Ongoing maintenance

How Builder Codes Work

1. Deploy Frontend

Build your own interface for DONUT mining

2. Add Your Code

Include your builder address in the contract calls

3. Get Users

Market your shop and attract miners

4. Earn Fees

Automatically receive 5% of all purchases

Getting Started as a Builder

Technical Requirements

  • • Web3 integration (ethers.js or web3.js)
  • • Base network support
  • • Contract interaction knowledge
  • • Frontend framework of your choice
  • • Hosting solution (Vercel, Netlify, etc.)

What to Build

  • • Wallet connection interface
  • • Current auction price display
  • • "Buy King Glazer" function
  • • Mining stats and analytics (optional)
  • • User dashboard (optional)

Smart Contract Integration

// Example: Mining with your builder code

const mine = async (minerAddress, builderAddress) => {
  const miner = new ethers.Contract(
    MINER_ADDRESS,
    MINER_ABI,
    signer
  );

  const epochId = await miner.getSlot0().epochId;
  const currentPrice = await miner.getPrice();
  const deadline = Math.floor(Date.now() / 1000) + 300;
  
  const tx = await miner.mine(
    minerAddress,      // Who becomes King Glazer
    builderAddress,    // Your builder code address (5% fee)
    epochId,           // Current epoch
    deadline,          // Transaction deadline
    currentPrice,      // Max price willing to pay
    "Your Shop Name",  // Optional URI/metadata
    { value: currentPrice }
  );
  
  await tx.wait();
};

Important: Pass your wallet address as the provider parameter to earn 5% of the purchase price. If you pass address(0), the 5% goes to the treasury instead.