01
Attribution sequence
- 01Deploy the Base Mini App to a stable HTTPS origin.
- 02Register and verify the app on Base.dev.
- 03Copy the real Builder Code from Base.dev settings.
- 04Generate the ERC-8021 dataSuffix from that code with ox/erc8021.
- 05For a direct transaction path you own, append one normalized dataSuffix after removing any existing suffix.
- 06Create a small USDCtoFiat deposit and verify attribution before launching a campaign.
02
Where it belongs
| Surface | Attribution path |
|---|---|
| Base App | Base docs say registered apps can receive automatic attribution for activity inside the Base App. |
| Web app | The USDCtoFiat web adapter replaces any existing suffix and appends the production codes. |
| USDCtoFiat SDK | The SDK supplies its own galleonlabs referrer. Do not stack a second client-level suffix; separate integrator codes are not supported by the current SDK API. |
| Contracts | No contract change is needed; ERC-8021 suffix data is appended to calldata and indexed offchain. |
03
Implementation notes
- Use viem 2.45.0 or newer for the Base docs path; this app already runs a newer viem version.
- USDCtoFiat's production adapter is wired with an issued Builder Code. Successful attribution still needs transaction-level verification.
- For direct Viem or Wagmi transactions you own, generate one dataSuffix from all intended codes.
- Do not concatenate independent ERC-8021 suffixes. Parse and replace or merge codes into one suffix before signing.
- The @usdctofiat/offramp SDK already supplies Galleon Labs attribution. It does not expose a separate Builder Code merge option.
04
Verification
| Check | Pass condition |
|---|---|
| Base.dev | Onchain transaction counts increment for the app's Builder Code. |
| Block explorer | The transaction input ends with the ERC-8021 suffix marker and decodes to the expected code. |
| USDCtoFiat result | The created deposit returns depositId and txHash, then appears in deposits(address). |
| Peerlytics | The deposit and intent lifecycle can be inspected after indexing catches up. |