How would you do it?

Writing the code for a transparent , provably random and equally fair lottery function on ICP?

High level , user would pay ICP to create raffle , user would pay ICP to enter , winner provable , losers returned their entry fee.

As a reference from another blockchain , Chainlink’s VRF here but I’m not sure this would provide the same functionality required.

Hope to hear some great ideas and brainstorm with you guys.

Cheers,
EM