A referral code credits the person who referred you. If the referrer's tier has a discount (set on-chain), the fee charged can be lower than the fee shown.
Referral terms on Solana
Referrers earn up to 15% · you save up to 10%
The discount is applied to the fee quoted before you sign. Commission accrues on-chain until the referrer withdraws it.
First referrer sticks: once a creation with a referral is recorded for your wallet on this chain, that referrer stays linked and is credited on later creations, whatever code you enter.