Skip to content

chore(entropy) Add images #633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/entropy-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/entropy-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions pages/entropy/protocol-design.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This protocol has the property that the result is random as long as either A or
Thus, neither party needs to trust the other -- as long as they are themselves honest, they can
ensure that the result $r$ is random.

The diagram below shows the protocol flow:
![Entropy Protocol Flow](images/entropy-1.png)

Entropy implements a version of this protocol that is optimized for on-chain usage. The
key difference is that one of the participants (the provider) commits to a sequence of random numbers
up-front using a hash chain. Users of the protocol then simply grab the next random number in the sequence.
Expand Down Expand Up @@ -44,6 +47,9 @@ Of course, both of these behaviors are detectable and protocols can blacklist pr
This protocol has the same security properties as the 2-party randomness protocol above: as long as either
the provider or user is honest, the number $r$ is random.

The diagram below shows the user's interaction with the entropy contract to generate a random number:
![Entropy Contract Flow](images/entropy-2.png)

Note that providers need to be careful to ensure their off-chain service isn't compromised to reveal the random numbers -- if this occurs, then users will be able to influence the random number $r$.

The code of default deployed provider can be found [here](https://github.com/pyth-network/pyth-crosschain/tree/7bccde484f01c19844b7105d63df207a24018957/apps/fortuna).