verifiable random function (VRF)
A verifiable random function (VRF) is a keyed function that produces an output looking perfectly random, together with a proof that the output was computed correctly from a given input. Anyone holding your public key can check the proof, but only you, with the secret key, could have produced that exact output.
Formally, with secret key sk: (output, proof) = VRF(sk, input); and Verify(pk, input, output, proof) accepts only the unique correct output. Three properties matter: pseudorandomness (output is indistinguishable from random to anyone without sk), uniqueness (each input maps to exactly one provable output, so the holder cannot 'grind' for a favorable one), and verifiability (the proof convinces everyone). The common construction is ECVRF, an elliptic-curve VRF used by Algorand and Chainlink VRF.
Its killer app is private, unbiasable leader election. In Algorand and in Cardano's Ouroboros Praos, each validator privately evaluates a VRF over the slot's seed randomness; if the output falls below a threshold proportional to their stake, they are a leader and reveal the proof. No one can predict in advance who will be chosen (thwarting targeted attacks), yet everyone can verify afterwards that the winner did not cheat. Chainlink VRF supplies the same tamper-evident randomness to on-chain games and NFT mints.
A VRF's uniqueness is what stops 'grinding'. Unlike a commit-reveal scheme where a party could withhold an unfavorable reveal, the VRF output is forced — the holder cannot try many keys or inputs to bias the result in their favor.