Usually, commitment schemes are used for this: https://en.wikipedia.org/wiki/Commitment_scheme
(However, if the stakes are high enough, the party that learns the outcome first can choose to exit the protocol if they are unsatisfied with the result.)
(However, if the stakes are high enough, the party that learns the outcome first can choose to exit the protocol if they are unsatisfied with the result.)
https://darkcephas.blogspot.com/2017/07/fair-random-number-g...