What you are describing is called the common coin problem and has been introduced in [1]. One way to do this is to elect a leader and then let that leader flip a coin, for example, by using the lightest bin protocol[2].
Intuitively speaking, this works as follows:
We have $n$ processes (=parties) and choose $m=n/\log n$ bins.
- In every round, every participating process chooses one of these $m$ bins uniformly at random and broadcasts this choice.
- The bad processes get to choose after observing the choices of the good processes.
- So at the end of a round every process knows exactly which process chose which bin. All processes that chose the lightest bin (i.e. the one with the fewest members) continue to the next round, while all others stop participating.
The trick is to keep the initial ratio of good processes to bad processes. How can the adversary try to prevent this? Clearly, the adversary's strategy is to make many bad processes survive until the next round, i.e., many bad processes are in the lightest bin. But since the good processes will be distributed almost uniformly among the bins, the adversary cannot place too many bad processes into the lightest bin, otherwise it will no longer be the lightest! (Once you have reached a constant number of participants you switch to $m=2$ bins.)
This protocol elects a good process as the leader with constant probability as long as a majority of processes is good, i.e., you will get an unbiased common coin with constant probability.
[1]: M. Ben-Or and N. Linial. “Collective coin flipping”.
In Advances in Computing Research, S. Micali, ed.,
vol. 5: Randomness and Computation, JAI Press,
Greenwich, CT, 1989, 91–115.
[2] Uriel Feige: Noncryptographic Selection Protocols. FOCS 1999: 142-153