Taking a more "human in the loop" approach to arbitration than the Kleros-led EIP-792
, the included contracts serve as tools to build arbitrable jurisdictions for ERC20/721 tokens.
Contract | Description |
---|---|
Arbitrable |
Basic arbitrable functionality. Constructor initializes arbitrator as contract creator. Provides function for arbitrator to select succeeding arbitrator. |
IArbitrable |
Interface specification for arbitrable contracts |
Arbitrator |
Basic arbitrator functionality. Provides functions to add/remove parent arbitrators and for them to invoke on behalf of the contract. |
IArbitrator |
Interface specification for arbitrator contracts. |
ArbitrableWrappedERC20 |
ERC20 wrapper into which anybody can deposit.
|
ArbitrableERC20 |
ERC20 token which can be minted/burned/transferred by arbitrator (i.e. natively arbitrable token) |
UniswapV2Helper |
Arbitrator helper that allows token holders access to liquidity outside the arbitrable jurisdiction |
ArbitrableERC20LiquidityPool |
Alternatively, arbitable ERC20 tokens could be swapped using a modified UniswapV2-style liquidity pool which always checks the token balances instead of maintaining reserve amounts in local state. This allows liquidity providers to keep their tokens inside the arbitrable jurisdiction while earning swap fees. |
ArbitrableWrappedERC721 |
ERC721 wrapper into which anybody can deposit an NFT from a specific collection.
|
As the base ERC20/721 standards define ownership, the right to dispose of a token falls solely on the purview of the balance holder.
The arbitrable jurisdiction brings a social ownership mechanism to a set of tokens. Tokens can now be disposed by the balance holder, the arbitrator, or any arbitrator above them.
This framework allows a group to build trust and culture around their decisions regarding token distribution. Each group is free to decide how to structure their tiers of arbitrators according to their own principals.
$ git clone https://github.com/Ethereum-Social-Contract/arbitrable-wrappers.git
$ cd arbitrable-wrappers
$ yarn install
Download the solc
compiler. This is used instead of solc-js
because it is much faster. Binaries for other systems can be found in the Ethereum foundation repository.
$ curl -o solc https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.8.13+commit.abaa5c0e
$ chmod +x solc
# Build contracts before running tests
$ yarn run build-test
$ yarn run build-dev
$ yarn test