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)
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
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.
// 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