The NIPS protocol provides a way to award and display badges in user profiles using events. It defines three special events - Badge Definition, Badge Award, and Profile Badges. The Badge Definition event uniquely identifies the badge, while the Badge Award references a Define Badge event and one or more pubkeys. The Profile Badges event contains an ordered list of pairs of Badge Definition and Badge Award events for each badge to be displayed. The Badge Definition event has tags such as d, name, image, and description, which provide information about the badge. The Badge Award event also has tags like d, name, and image, but it doesn't have the description tag. The Profile Badges event is used to display all the badges in a user profile.
Link: https://github.com/nostr-protocol/nips/blob/master/58.md