{"id":20415386,"url":"https://github.com/gratestas/erc-792-weighted-arbitrator","last_synced_at":"2026-05-10T10:32:12.924Z","repository":{"id":110727425,"uuid":"482260115","full_name":"gratestas/erc-792-weighted-arbitrator","owner":"gratestas","description":"implementation of Kleros erc-792: Arbitration Standard proposed by Kleros","archived":false,"fork":false,"pushed_at":"2022-04-21T15:06:36.000Z","size":291,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T13:44:04.334Z","etag":null,"topics":["arbitrable","arbitrator","erc-792","kleros","smart-contracts"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gratestas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-16T13:22:55.000Z","updated_at":"2022-04-16T15:51:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"1f5a59ef-b049-4385-8f96-79bac80fdb4b","html_url":"https://github.com/gratestas/erc-792-weighted-arbitrator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gratestas%2Ferc-792-weighted-arbitrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gratestas%2Ferc-792-weighted-arbitrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gratestas%2Ferc-792-weighted-arbitrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gratestas%2Ferc-792-weighted-arbitrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gratestas","download_url":"https://codeload.github.com/gratestas/erc-792-weighted-arbitrator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241960796,"owners_count":20049340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbitrable","arbitrator","erc-792","kleros","smart-contracts"],"created_at":"2024-11-15T06:15:38.107Z","updated_at":"2026-05-10T10:32:12.824Z","avatar_url":"https://github.com/gratestas.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ERC-792: Simple (Non-appeable) Weighted Arbitrator\nThe smart contract collects rulings from multiple arbitrators and fuses those into a single ruling based on the weight of each arbitrator. \n\nWeighted 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)`\n\u003c/br\u003e\n\u003c/br\u003e\n\u003c/br\u003e     \n## Weighted Ruling Mechanism\nA 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. \n\u003c/br\u003e\n\u003c/br\u003e\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?%5Clarge%5Cmathit%7BweightedRuling%7D%3D%5CLarge%5Cfrac%7B%5Csum_%7Bi%3D0%7D%5E%7BN%7D%7Br_iw_i%7D%7D%7B%5Csum_%7Bi%3D0%7D%5E%7BN%7D%7Bw_i%7D%20%7D\"\u003e\u003c/div\u003e\n\u003c/br\u003e\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?where%5C%3A%20%5C%3A%20%5Csum_%7Bi%3D0%7D%5E%7BN%7D%7Bw_i%7D%3D100\"\u003e\u003c/div\u003e\n\nwhere:\u003c/br\u003e\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\Large\\r_i\"\u003e- ruling of `i-th` arbitrator \u003c/br\u003e\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\Large\\w_i\"\u003e- weighting factor allocated for `i-th` arbitrator\n\n\n#### Final decision\nFor 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.\n\u003c/br\u003e\n\u003c/br\u003e\n\u003c/br\u003e\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?%5Clarge%5Ctextit%7BfinalRuling%7D%3D%5Clarge%5Cleft%5C%7B%5Cbegin%7Bmatrix%7D%202%20%26%5Ctext%7Bif%20%24wieghtedRuling%3Equota%24%7D%20%5C%5C%201%20%26%20%5Ctext%7Botherwise.%7D%20%5Cend%7Bmatrix%7D%5Cright.\"\u003e\u003c/div\u003e\n\u003c/br\u003e\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?where%5C%3A%20%5C%3A%20quota%5Cin%20%2850%2C100%29\"\u003e\u003c/div\u003e\n\n\n## Testing\n```\n// Clone the repository\ngit clone https://github.com/gratestas/erc-792-weighted-arbitrator.git\n\n// Navigate into repository\ncd erc-792-weighted-arbitrator\n\n// Install the dependencies\nyarn install\n\n// Run test\nnpx hardhat test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgratestas%2Ferc-792-weighted-arbitrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgratestas%2Ferc-792-weighted-arbitrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgratestas%2Ferc-792-weighted-arbitrator/lists"}