Pocket Network leverages useful proofs of work to create new $POKT. These proofs are critical to Pocket’s economic model as block rewards are dynamic, created by the validation of these proofs.

The following is the step by step process on how work is validated by the protocol.
1. A node is chosen to be in a session and serves as many relays (API requests) as they can to applications during this session
2. Node creates relay proofs that are kept in local memory and are written to levelDB periodically (These proofs are a struct that hold things like session information, application information and signatures)
3. Node creates a merkle sum tree with all of the relay proofs (a critical property of this tree is that the node to the left is __always__ less than the node to the right to prevent replay attacks with already valid proofs)
4. Node sends a claim tx to pocket network, this claim tx holds the root of the merkle sum tree they created and the count of relays at the end of the session
5. Node waits 2 sessions (think around an hour per session)
6. Node proves their claim by deriving a zero-knowledge range proof with the public block hash and public session key. This results in a random relay proof as a leaf in the tree that was submitted 2 sessions previous
7. Since the node already has the entire construction of the tree in memory, and the block hash and session key are public, the node is able to regenerate the tree using the proofs, and select the proper proof object from the tree
8. The node also must provide the cousin of the leaf that was derived to prevent replay attacks with certain patterns of the tree
9. The node proves their claim by submitting the merkle proofs of these two proofs, meaning it's highly probable they did the work they said they did
10. Once this proof is sent to the chain as a pocket tx, this triggers every node in the network through consensus to ensure this is a valid transaction. They do this with data from the world state like max relays, number of chains staked for, session node count, etc
11. profit, you can claim the $POKT you spent all that electricity and bandwidth on creating
You can follow @o_rourke.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: