https://github.com/gratestas/erc-792-weighted-arbitrator
implementation of Kleros erc-792: Arbitration Standard proposed by Kleros
https://github.com/gratestas/erc-792-weighted-arbitrator
arbitrable arbitrator erc-792 kleros smart-contracts
Last synced: 3 months ago
JSON representation
implementation of Kleros erc-792: Arbitration Standard proposed by Kleros
- Host: GitHub
- URL: https://github.com/gratestas/erc-792-weighted-arbitrator
- Owner: gratestas
- Created: 2022-04-16T13:22:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-21T15:06:36.000Z (over 4 years ago)
- Last Synced: 2025-01-15T13:44:04.334Z (over 1 year ago)
- Topics: arbitrable, arbitrator, erc-792, kleros, smart-contracts
- Language: Solidity
- Homepage:
- Size: 284 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ERC-792: Simple (Non-appeable) Weighted Arbitrator
The smart contract collects rulings from multiple arbitrators and fuses those into a single ruling based on the weight of each arbitrator.
Weighted Arbitrator implements `IArbitrator` and `IArbitrable` interfaces derived from ERC-792 Standard. This means that `WeightedArbitrator` is an `arbitrator` for any arbitrable contract, while it is `arbitrable` for each arbitrator it receives ruling from. The total arbitration cost is correlated with the number of arbitrators drawn into the dispute in the form of `O(numberOfArbitrators)`
## Weighted Ruling Mechanism
A simple weighted average equation is used to fuse all rulings collected from a set of authorized arbitrators into one final weighted ruling, taking into account the ruling power of each.
where:
- ruling of `i-th` arbitrator
- weighting factor allocated for `i-th` arbitrator
#### Final decision
For the sake of simplicity, the `numberOfChoices` is kept to be limited by 2. A `quota` (the threshold required to pass for the majority) state variable is introduced to determine the final decision.
## Testing
```
// Clone the repository
git clone https://github.com/gratestas/erc-792-weighted-arbitrator.git
// Navigate into repository
cd erc-792-weighted-arbitrator
// Install the dependencies
yarn install
// Run test
npx hardhat test
```