Skip to main content

Registration of Generators in a Market

Generators are required to register in Kalypso before they can register in individual Markets. Registration in individual markets is necessary for the Matching Engine to know that a certain Generator can and is interested in generating proofs for that market.

Registering as a Generator

Registration in Kalypso simply involves staking Protocol Tokens and providing a Reward Address by calling a registration function from their Admin Address. After registration, Generators can browse through the statistics () of existing Markets and register for one or more Markets.

Prerequisite artifact - the Prover

Creators are recommended to make Sample Provers available to Generators for easy onboarding. Generators can either use such reference implementations provided by the Creator or application developer, or make further optimizations themselves or with the help of one of many consulting companies in the ZK proving space. Generators are not required to make their Prover code public.

In cases where the Market supports private inputs, Generators are required to use the Generator Image made available by Creators and configure it to use the desired Prover. The Generator Image and Prover in such cases are required to be run in an AWS Nitro Enclave.

Prerequisite parameters

Prior to registering for a Market, Generators should figure the values to some of the key parameters listed below:

  1. ComputePerProof: Kalypso optimizes the resource utilization of Generators by listing them simultaneously across the different Markets they register in. In order to determine when to remove a Generator from other Markets, Kalypso requires Generators to mention the fraction of their compute power (ComputePerProof) they dedicate to generating a single proof of every market.

    The Matching Engine initializes AvailableCompute for every Generator with 1 and subtracts ComputePerProof every time it assigns a Task to a Generator, increasing it back once they submit valid proofs. This allows the Matching Engine to delist (or relist) Generators on Markets when their AvailableCompute falls below (or exceeds) ComputePerProof for that Market.

    Generators can use the benchmarking tool, if made available by Market Creators, to determine what amount of computational resources produces proofs for a market in what amount of time.

  2. MaxProofTime: It is the maximum time by which the Generator commits to send a valid proof for the Market. Similar to ComputePerProof, Generators can use benchmarking tools made available by Market Creators to determine how long it takes them to generate proofs for a certain amount of dedicated compute power.

    MaxProofTime would normally be a function of ComputePerProof so it’s an optimization problem Generators are required to solve themselves based on pricing, timing, demand and other metrics they can observe across Markets and their own available computational resources.

  3. PricePerProof: It is the amount the Generator expects Requesters to pay to generate a proof. The Matching Engine uses this information to filter out Generators who won’t be interested in Requests that pay less. If Requesters are matched with Generators where the amount they are willing to pay exceeds PricePerProof, the excess amount is refunded back to Requesters.

Registering on a Market

Once a Generator has prepared the required artifacts and figured the values for the parameters mentioned in the previous section, the Generator can proceed with registering for the Market. If the Market supports private inputs, the Generator is also required to prove that it is running the Generator Image provided by the Creator through an enclave attestation and register the public key of the key pair generated inside the enclave (which is used to encrypt private inputs sent to it).