# How would you do it?

**URL:** <https://forum.dfinity.org/t/how-would-you-do-it/12256>\
**Category:** Programs & Applications\
**Created:** [April 18, 2022, 10:33pm UTC](https://forum.dfinity.org/t/how-would-you-do-it/12256 "2022-04-18T22:33:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emmo](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/emmo/32/831_2.png) [@Emmo](https://forum.dfinity.org/u/Emmo)\
**Post date:** [April 18, 2022, 10:33pm UTC](https://forum.dfinity.org/t/how-would-you-do-it/12256/1 "2022-04-18T22:33:36Z")

</div>

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](https://blog.chain.link/how-to-build-a-blockchain-lottery/) 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
