Skip to content

Protocol Overview

CommissionRoad is a monetization protocol that allows developers and protocol integrators to earn commissions on smart contract transactions. It separates the execution of transactions from the fee collection logic, providing a flexible and permissionless way to monetize any on-chain activity.

Architecture

The protocol consists of three main contracts:

  1. CommissionRoad: The purpose of this contract is to execute transactions and ensure the specified commission is collected. Developers will also use this contract to mint new CommissionRoadERC721 NFTs.
  2. CommissionRoadERC721: Holds the NFTs that represent ownership and provides fee claiming rights to the owner of that NFT.
  3. CommissionVault: Holds the collected fees for all NFTs. An NFT owner can claim their earnings from the Vault at any time.

Protocol Actions

  1. Mint: A developer mints a CommissionRoadERC721 NFT. This gives them a unique nftId.
  2. CommissionCall: An interface (dApp, wallet, script) submits a transaction using CommissionRoad.commissionCall.
    • This transaction includes a list of calls to execute (e.g., "Swap 1 ETH for USDC").
    • It also specifies the nftId and the commission token and amount.
    • CommissionRoad enforces that the msg.value sent (or tokens approved) covers the commission.
    • If the NFT owner has enabled a Allowlist, only pre-approved call targets are allowed.
  3. Claim:
    • All commissions are sent to the CommissionVault.
    • The nftId owner calls CommissionVault.claim to withdraw their earnings.