Kleros 2.0: A Walkthrough for Integrations

The testnet for Kleros 2.0 is here!

Over the years, the Kleros ecosystem has grown significantly, so as a partner you may be wondering what the upgrade to 2.0 means for your existing integration. Will I need to implement any custom code? How will this affect my users? Are there any new features I can make use of?

This article walks you through the most important elements of 2.0 from an integrations perspective whether you’re an existing partner or are just now looking into adding a dispute resolution layer to your application.

Getting up to speed

Version 1.0 of Kleros was launched in March of 2019 when gas prices were on average less than 10 gwei. Fast forward four years and the gas prices on Mainnet Ethereum have become prohibitively expensive for many of the use cases Kleros set out to tackle, with fees for a single smart contract interaction often exceeding 100 gwei.

Kleros 2.0 introduces a more gas efficient experience for both users and integration partners, while also introducing a whole set of features such as:

  • Cross-chain functionality,
  • Modularity,
  • Fork-friendliness,
  • A more lightweight PNK token,
  • Juror fraud protection,
  • Evidence spam protection and of course,
  • A beautiful new user interface.

Backwards compatibility

Kleros 2.0 is designed to be backwards compatible with 1.0 to make the transition as frictionless as possible for partners in our ecosystem.

Our team is here to walk you through the migration process by helping you “unplug” from V1 and simply plug directly into 2.0 as the arbitrator for your application.

For more info on the process, feel free to reach out to the team at integrations@kleros.io.

Cross Chain

Understanding the home and foreign chain architecture of 2.0 is key to understanding how your application might interact with the court depending on which chain you’re on.

In simplest terms, disputes originating from foreign chains may be bridged to the court’s home chain (Arbitrum). Ruling messages are then bridged back to the respective foreign chain for your application to handle. On the other hand, if your application is already deployed natively on Arbitrum, then you’ll be able to take full advantage of the gas efficiency of the rollup without needing to worry about bridging.

Gas efficiency

Cost saving of Kleros 2.0 compared to Kleros 1.0.

The switch to Arbitrum as 2.0’s home chain means that gas costs for all operations are significantly reduced. Whether you’re an existing integration partner or looking to integrate Kleros into your application in the future, 2.0 allows for significantly less friction on the side of your users when interacting with the court.

Modularity

The modular design of Court 2.0 means flexibility in many different areas. For us as the Cooperative, this means that we’re able to introduce new functionalities to the various subcourts based on new and evolving research without requiring changes to be made to the core contract of the court itself.

For existing and potential partners, this means that you’ll have more flexibility in terms of which features from different dispute kits you want to make use of to integrate the dispute resolution process that makes the most sense to your application.

The following bullet points are taken from Jay Buidl’s article on 2.0 published back in November of 2021.

If you want to check out the dispute kits currently available, check out the repository here!

Dispute Kits

  • Dispute kits execute a specific set of features involved in the dispute resolution process.
  • Each court is compatible with a specific set of dispute kits.
  • The features in a dispute kit include typically:
  • A drawing system to select the jurors.
  • A vote aggregation system to determine the winning choice.
  • An incentive system to redistribute ETH fees and staked PNK involved in a dispute according to the jurors coherence.
  • An appeal system to handle subsequent voting rounds.
  • When the dispute kit is compatible with the Forking Court:
  • It tells Kleros Core how to redistribute the staked PNK of jurors who decide to join a fork among the other jurors according to the rules in the Yellow Paper section 4.10.1.
  • Examples of drawing systems based on the Yellow Paper section 4.5.2
  • PNK drawing
  • Selection odds in proportion of staked PNK amounts.
  • RNG from Chainlink.
  • Proof of Humanity drawing
  • Random selection among staked PNK who are also registered on Proof of Humanity at the drawing time, with a profile drawn at most once.
  • RNG from Chainlink.
  • Examples of vote aggregation systems based on the Yellow Paper section 4.7.2.2
  • Plurality (same as Kleros v1).
  • WoodSIRV (aka Condorcet-IRV).
  • Examples of incentive systems based on the Yellow Paper section 4.7.3
  • Equal split between coherent votes (same as Kleros v1).
  • Other “weight functions”.
  • Examples of appeal systems based on the Yellow Paper section 4.8.2.2
  • Fund 2 only, Vote on Any Option (same as Kleros v1).
  • Fund 2 or more, Vote on Funded Options.
  • Fund 1, Stake on Custom Options Set.

Ready, Set, Go

What does this all mean for all Kleros integrations, both existing and upcoming? A more agile system, adapted to the latest advances in Ethereum R&D, the ability to carry a much larger load while retaining all the highest security practices that Kleros is known for.

With our testnet out, many exciting developments are right around the corner - our integrations team is ready to take all of your requests, so feel free to reach out to us both through Telegram, our Slack and email at integrations@kleros.io.

Welcome to the future of justice!