Badges are non fungible tokens used to document or certify achievements in academics or in any other domain. Besides their utility as proof of achievement, badges are of interest in higher education as pure incentives to push the students and learners in general toward pursuing well-defined goals and skills. In this respect, badges can be naturally incorporated into digital learning platforms also as part of informal learning activities, and stimulate participation, merit, and visibility for the students. However, the level of engagement of learners into these learning activities depends crucially on how the system of badges and rewards has been designed and on how it is applied, if it is to be used effectively. In this paper, we report on the design and implementation of a smart badges system, and an example of its use inside a gamification methodology for informal learning in a master level course, and discuss the benefits and the observed gains in learning performance that can be obtained.