# Why Cadence Only provide UnsafeRandom function instead of using random number generated by threshold signature?

**URL:** <https://forum.flow.com/t/why-cadence-only-provide-unsaferandom-function-instead-of-using-random-number-generated-by-threshold-signature/2009>\
**Category:** 🏄🏻‍♀️ Cadence\
**Created:** [May 31, 2021, 7:29am UTC](https://forum.flow.com/t/why-cadence-only-provide-unsaferandom-function-instead-of-using-random-number-generated-by-threshold-signature/2009 "2021-05-31T07:29:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bluesign](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/bluesign/32/1359_2.png) [@bluesign](https://forum.flow.com/u/bluesign)\
**Post date:** [May 31, 2021, 5:49pm UTC](https://forum.flow.com/t/why-cadence-only-provide-unsaferandom-function-instead-of-using-random-number-generated-by-threshold-signature/2009/2 "2021-05-31T17:49:02Z")

</div>

We recently discussed this on forum[0] and on office hours. Basically they are few issues as far as I can see.

- Try & Abort ( basically interact with the contract in a brute force way till you get the result you want, panic if you don’t like the result)
- Your transaction is executed on multiple execution nodes and result is compared (if you had different random on those nodes, they would disagree) So I think syncing the random for transaction would be a bit problematic

I think second issue can be solved, also there are some ideas for the first one.

Sooner or later I believe we will have random on chain.

[0] [http://forum.flow.com/t/randomness-for-nft-packs-on-flow/1830/5](http://forum.flow.com/t/randomness-for-nft-packs-on-flow/1830/5)

---

_[View the full topic](https://forum.flow.com/t/why-cadence-only-provide-unsaferandom-function-instead-of-using-random-number-generated-by-threshold-signature/2009)._
