Gamification has the potential to act as a catalyst in various domains, with education being a particularly promising area for enhancing learning outcomes. Specifically, computer science courses are ideal candidates for gamification due to their inherent focus on programming activities. By integrating programming and gamification, these courses can complement each other effectively. In this study, a gamification model is introduced and applied to a blockchain technology course, where blockchain programming serves as the core subject matter. Blockchain technology can be challenging to understand for many individuals due to its association with cryptography and its emergence as a new technological paradigm. However, the proposed gamification model helps alleviate the difficulty of learning blockchain concepts. The gamification model consists of four phases: outcomes phase, gamification phase, story phase, and application phase. The application of this gamification model has been found to enhance student engagement, as evidenced by reports. Moreover, it has been observed that the proposed gamification model leads to improved learning performance according to observations and student comments.