I understand how a smart contract might work for a variable with a binary value. For example, a purchase may occur if the price on a certain exchange hits an agreed upon value or the winner of a bet could collect if Team A beats Team B as reported by an agreed upon source. However, what if the execution is dependent on a variable that can’t be explicitly predefined?
For example, say I wanted to create a smart contract betting pool for what name Britney Spears will give her child. Participants can secure their guesses, and the person who chooses correctly would win the prize money. The variable that needs to be input to execute the contract has a single answer, but how would the contract independently determine what it is?