High gas prices on Ethereum Mainnet make it a necessity for Kleros and projects using Kleros to find solutions that scale properly. This is a proposal to set up Kleros on xDai chain. The Kleros courts on xDai will initially resolve disputes generated on xDai but could potentially resolve bridged disputes in the future.
In order to have Kleros working on xDai, a KlerosLiquid contract has to be deployed with changes regarding PNK, randomness and upgradeability.
The Mainnet Kleros token is already bridged on xDai. The address of the PNK on xDai is 0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3 and you can get it through the OmniBridge . However, the token contract available on xDai doesn’t fit the KlerosLiquid contract, which requires a controller role so that it can lock and distribute rewards during disputes.
To solve this problem, instead of creating a new bridged PNK, the already existing xDai PNK will be wrapped with the proper requirements. Additionally, the wrapped PNK contract will be upgradeable.
In order to prevent the potential scenario in which too many PNKs are moved from Mainnet courts to xDai courts, only 10% of the Juror Incentive Program funds (100,000 PNK per month) are going to be used for those staking on xDai. This should work both as an incentive for jurors to keep their PNK, or part of them, staked on Mainnet and as an incentive for jurors to move to xDai courts.
Jurors are drawn randomly for each round of a dispute. KlerosLiquid on xDai cannot rely on the legacy random number generator used on mainnet, which works with block hashes. For this reason, RandomAuRa is going to be used instead. RandomAuRa is an official random number generator contract already available on xDai at address 0x5870b0527DeDB1cFBD9534343Feda1a41Ce47766 . Random numbers are generated every N blocks, currently set at 76.
Making the contract upgradeable will allow us to deploy quickly and adapt in the future along Kleros scalability roadmap.
Initially, the contracts will be deployed by the Gnosis multisig instead of by the Kleros Governor and the courts won’t be bridged with Mainnet. This means that arbitration will happen entirely on xDai. Notice that until this changes and because juror stake and activity is expected to be lower than on Mainnet, security and decentralization on xDai courts will be lower than on Mainnet courts. For this reason, this can be considered an experimental project. Omen on xDai will keep using the current bridge for passing disputes to Mainnet.
Future upgrades will make Kleros Governor the owner of xDai Kleros Liquid and jumps from xDai courts to Mainnet courts will be allowed in order to make the main Kleros the final arbitrator of disputes happening on xDai. Similarly, when Kleros Court v2 gets implemented and deployed on a optimistic or zk rollup, xDai courts could be bridged to the new version instead of the legacy one on Mainnet.
The native xDai currency is going to be used for juror fees instead of ETH. Notice that this means that juror fees will be stable.
The proposed parameters for xDai Kleros Liquid are the following (which are the same in Mainnet):
minStakingTime : 3600
maxDrawingTime : 7200
The general court, which is created on deployment, will have the following parameters:
name : xDai General Court
hiddenVotes : false
feeForJuror : 15 xDai
minStake : 520 PNK
alpha : 0.5
jurorsForCourtJump : 511
timesPerPeriod : [280800,583200,583200,388800]
sortitionSumTreeK : 6
The general court policy will be the same as the Mainnet general court.
In addition to the general court, a subcourt to resolve curate cases will be deployed with the following proposed parameters:
name : xDai Curation
parent: xDai General Court
hiddenVotes : false
feeForJuror : 6.9 xDai
minStake : 520 PNK
alpha : 0.31
jurorsForCourtJump : 30
timesPerPeriod : [140400,291600,291600,194400]
sortitionSumTreeK : 5
The curate court policy will be the same as the Mainnet curate court.
The wrapped PNK and the KlerosLiquid adaptation are already implemented at the time of writing and are going through the review process. Check out the source code: