Pricing A Request
Each request needs to specify how much the requestor is willing to pay to receive a proof. Each prover on the decentralized market will decide whether that price is acceptable to them, and compete to fulfill those requests.
The offer section of a request specifies the parameters of the reverse Dutch auction, part of the proof lifecycle. This is the mechanism by which the requestor and prover can agree upon a price, and ensures the requestor will get the best price available from any prover on the market.
Offer Parameters
An offer contains the following:
- Pricing parameters
- Minimum price
- Maximum price
- Ramp-up start (timestamp measured in seconds since the UNIX epoch)
- Length of ramp-up period (measured in seconds since ramp-up start)
- Lock timeout (measured in seconds since ramp-up start)
- Timeout (measured in seconds since ramp-up start)
- Lock collateral (measured in ZKC)
For example, an offer might specify:
- Pricing parameters
- Minimum price: 0.001 Ether
- Maximum price: 0.002 Ether
- Ramp-up start: 1000 seconds since the UNIX epoch
- Length of ramp-up period: 50 seconds
- Lock timeout: 100 seconds
- Timeout: 200 seconds
- Lock collateral: 2 ZKC
The pricing parameters are used to determine the reward that gets paid-out when the request is fulfilled (ie, the proof has been verified).
- During the discovery period (the initial phase of the auction before ramp-up start), the price is just the minimum Ether price.
- During the ramp-up period (which immediately follows the discovery period), the price grows linearly up-to the maximum Ether price.
- After the ramp-up period, the price remains at the maximum Ether price until lock timeout.
- After the lock timeout, the price in Ether drops to zero.
- If the request was locked, but not fulfilled, then a portion of the lock collateral is slashed from the prover that locked the request and awarded to anyone that fulfills the request before timeout.
Continuing with the example offer given above, the price is constant (0.001 Ether, its minimum) until ramp-up starts at timestamp 1000; at timestamp 1010 it jumps to 0.0012 Ether; on 1020 it jumps to 0.0014 Ether; on 1050 it reaches 0.002 Ether (its maximum), and remains at that value until the lock expires.
Provers can lock a request at any time before the lock timeout. When a prover locks-in a request, they are agreeing to be paid the reward offered by this function at the time of their bid. They are also agreeing to be slashed if they do not fulfill the request before the lock timeout.
After the lock expires, the price in Ether drops to 0. If the request was locked but not fulfilled, the prover that locked the request is slashed of their lock collateral. A portion (currently 25%) of the lock collateral is used to price the request. Therefore, the price of the request is 0.5 ZKC until the request expires.
Pricing Calculator
Use this interactive calculator to get suggested offer parameters based on your program's cycle count and your desired proof time.
Suggested Offer Parameters
- Minimum Price:
0.00000000 ETH0.00000000 ETH - Maximum Price:
0.00100000 ETH0.00100000 ETH - Ramp-up Start Delay:
1 block1 block - Ramp-up Period:
100 blocks100 blocks - Timeout:
300 blocks300 blocks - Lock-in Collateral:
5.000000 USDC5.000000 USDC
Offer Parameters (request.yaml)
offer:
min_price: 0 # wei
max_price: 1000000000000000 # wei
rampUpStart: 1 # blocks
rampUpPeriod: 100 # blocks
timeout: 2700 # seconds
lockTimeout: 300 # blocks
lockCollateral: 5000000 # USDC