Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Referral Codes

Spark assigns integrator partners a unique 3-digit referral code (a uint16 in the range 100–999) that you embed in your integration so deposits coming from your product are attributed back to you.

How it works

The Spark Vault deposit function has an overload that accepts a referral code:

deposit(uint256 assets, address receiver, uint16 referral) returns (uint256 shares)

Pass your assigned code as the third argument when calling deposit. Everything else about the integration stays the same — see the Spark Vaults Smart Contracts integration guide and the deposit examples for the standard flow in viem, ethers, and Solidity.

If you do not have a referral code, use the two-argument deposit(assets, receiver) overload.

What a referral code unlocks

  • Attribution. Spark maintains a partner reporting dashboard that maps deposits and TVL back to each referral code, so you can see the performance of your integration.
  • Partnership benefits. Some integrator partnerships unlock additional benefits on top of the standard vault rate. These are activated through the same referral code, so the integration work is one-and-done.

Getting a code

Referral codes are issued by the Spark team.