# Builder codes and referrals

Source: https://docs.testnet.mog.xyz/integrators/builder-vs-referral/

Markdown: https://docs.testnet.mog.xyz/integrators/builder-vs-referral.md

Reviewed protocol version: 11.0.0

Protocol review date: 2026-10-30

Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values.

The app's [referral links](https://docs.testnet.mog.xyz/account/referrals/) and an integrator's builder code are the same thing on chain. Both put an address in the `builder` field of each order. Both earn the same share, under the same holding rule. See [Builder codes](https://docs.testnet.mog.xyz/integrators/builder-codes/).

They differ only in who fills the field.

|                                                 | Referral link                                             | Builder code in your interface             |
| ----------------------------------------------- | --------------------------------------------------------- | ------------------------------------------ |
| Who sets the builder                            | The Mog app, from the referral the trader accepted        | Your interface, on every order it signs    |
| Where the link between trader and builder lives | Off chain, in Mog's referral records                      | In each signed order                       |
| Which orders it covers                          | Orders the trader places in the Mog app                   | Orders the trader places in your interface |
| Holding rule and share                          | Same                                                      | Same                                       |
| Can the trader change it                        | The trader cannot replace an accepted referrer in the app | Each order names its own builder           |

## What this means for a trader who uses both

A trader can accept a referral in the Mog app and also trade in your interface. Each order pays the builder it names. Orders from the app pay the referrer. Orders from your interface pay you. No order pays two builders.

## Which one to use

- Use a **referral link** to bring traders to the Mog app.
- Use a **builder code** when traders use your own interface.

One address can do both. The holding rule, the recorded balance and the earnings are per address, so they are shared.
