Skip to main content

Refer User Without Deposit

Create a UserMetadata account with a referrer without requiring an initial deposit. This allows you to link a referrer to a user before they perform any lending operations.
The referrer must be set when the UserMetadata account is created and cannot be changed afterward.
1

Import Dependencies

2

Initialize RPC and Load Market

3

Check Existing User Metadata

4

Build User Metadata Setup Instructions

The referrer’s wallet must have Kamino user metadata itself. The instructions also create the wallet’s lookup table; false skips filling it. For a wallet that already has user metadata, the SDK returns no instructions.
5

Build the Transaction

6

Sign and Send

User metadata created. The referrer is now linked to the wallet and earns a share of the interest it pays on borrows.
Use this method when:
  • You want to link a referrer to a user before they make their first deposit
  • You’re creating UserMetadata as a separate step from deposit operations
  • You have a simpler flow that doesn’t require immediate deposit
Use Deposit with Referral when:
  • You want to combine UserMetadata creation and deposit in a single transaction
  • The user is ready to deposit immediately
  • You want to minimize the number of transactions