The Word Chest system in CoC2 is based on a combination of linguistic and mathematical algorithms. When a player uses the Word Chest, the game generates a random word from a vast list of possibilities. The word is then analyzed by the game's algorithm, which determines its properties and effects. The algorithm takes into account various factors, including the word's meaning, its phonetic and phonological properties, and its relationships with other words in the game's database.