Praise be to Allah.
What we think is that there are some reservations about giving prizes for games. These games are permissible so long as there is nothing haraam involved in them, such as uncovering ‘awraat, distracting people from their salaah, or players swearing at one another, all of which is haraam. If there is nothing haraam involved, then they are permissible and there is nothing wrong with them. But this taking contributions from all participants and giving it to the winner is not permissible, because the Prophet (peace and blessings of Allaah be upon him) said, “There should not be any prizes except for archery, camel-racing or horse-racing.”(Reported by Abu Dawood, no 2574; al-Tirmidhi, no. 1700; al-Nisaa’i, no 3586, 3587; Saheeh al-Jaami’, no. 7498). An exception is made for these three activities because they help in jihaad for the sake of Allaah.
Taking prizes in any other kind of contest is haraam, but some scholars such as Shaykh al-Islam Ibn Taymiyah said that there is nothing wrong with betting in matters of shar’i knowledge, because shar’i knowledge is a kind of jihaad for the sake of Allaah. Jihaad for the sake of Allaah includes jihaad with weapons and jihaad with knowledge. But we think that what is mentioned in the question is not permissible. And Allaah knows best.