Skip to main content

What is request tracking or a referral code?

A referralCode can be sent with Route or Bundle requests so on-chain ShortcutExecuted events can be used to track usage and rewards for that code.

J
Written by Javier Diaz

A referral code is a value you send with a Route or Bundle request so usage and rewards associated with that code can be tracked on-chain.

Definition

Request tracking tags the transaction the API builds with a referralCode. When the transaction runs, the executing Enso contract emits a ShortcutExecuted event that you can analyze later.

How it works

  • Add referralCode on Route or Bundle requests that should be attributed to a campaign or integration surface.

  • Each of those transactions emits ShortcutExecuted(accountId, requestId).

  • accountId is uniquely associated with your account and identifies requests from your project’s integration.

  • In requestId, the higher 16 bytes contain the referralCode.

How Enso does this

The field is documented as referralCode on both /route and /bundle. Implementation is described in Request Tracking. You attribute volume by reading the on-chain event, not by a separate analytics parameter in the quote response.

FAQ

Does a referral code change the route path?

The request-tracking guide describes tagging for usage and rewards. It does not describe a change to pathfinding.

Is this the same as a partner fee?

No. Partner fees are configured in the Developer Portal and appear in feeAmount and feeBreakdown. A referral code is an on-chain tracking tag.

Related articles

  • How do I tag a request with a referral code?

  • How do I set a partner fee on user trades?

  • What is the Enso Route API?

  • What is the Enso Bundle API?

  • How do I authenticate Enso API requests?

Sources

Did this answer your question?