Secure and efficient electronic ticket (e-ticket) management in the entertainment industry is important for both the compliance of service-level agreements and the pride of those involved. Despite its numerous benefits, the ease of duplication, fraud, and illegal resale poses several issues in the industry, which can adversely impact event organizers and legitimate buyers. Furthermore, security breaches could compromise buyers’ personal and financial information. An e-ticketing system based on blockchain is implemented, mainly designed for managing raffles. This system issues e-tickets recorded in encrypted form in a blockchain with multiple blocks. The system digitally signs each ticket, links it to the buyer, records the data on-chain, and conducts draws using secure cryptographic randomness. At the end of the process, the system provides an option to download an audit chain that facilitates the validation and audit of the draws. We used the agile Scrum methodology and Java to develop the e-ticket system, implementing the blockchain with a PostgreSQL database and a custom hash function. We store each block in an unstructured JSON-type field. To optimize response times in processing the proof-of-work (PoW) blockchain, a Java socket server was implemented to manage mining pools and distribute the load among miners. We organized the load into groups by applying the K-means algorithm to historical performance data. This classification enabled the formation of efficient groups that accelerated PoW resolution, enhancing the security and performance of raffle creation, signing, and execution, particularly under increased hash difficulty. Each miner received rewards based on their contribution, fostering community participation and encouraging continuous improvement in individual performance. We evaluated the system with an average block time of 30 s and a cost of \(\$ \)0.005, demonstrating economic viability for popular raffles with affordable ticket prices. In security tests, 10% of counterfeit tickets were successfully injected and rejected, demonstrating tamper resistance. These results confirm the feasibility of open, secure, and auditable raffles through blockchain verification, strengthening trust in public systems based on distributed technologies.