Operations in referral codes