Skip to Content

Referral System

The Lombard SDK provides referral tracking for user acquisition and attribution.


Implementation

Pass a referral code when preparing stake or deposit actions:

await stake.prepare({ amount: '0.1', recipient: '0x1234...', referralCode: 'PARTNER123', });

The code attaches at deposit address generation time.


Checking Referral Status

const result = await sdk.referrals.lookupReferrer(address); // Returns: { hasDepositAddress: boolean, referrer?: string }

Key Rules

  • Case-insensitive codes — cannot be changed once assigned
  • Association timing — codes attach during deposit address generation
  • Scope — codes link to destination addresses, not deposit addresses

Supported Actions

Referral codes work with:

  • BTC to LBTC staking
  • BTC to BTC.b deposits
  • Stake-to-DeFi vault deployments (stakeAndDeploy)
  • Deposit-to-DeFi vault deployments (depositAndDeploy)
Last updated on