It's easy. You "gift" the badge to a user via the Signal homepage when making a connection. There's no required connection between the gift-giver and the receiver. Is the person who gifted the badge the same as the receiver? Could very well be, but there's no way to prove that.
All you need to store server-side is "this user has the badge until date X".