Skip to content

ERC20/ERC721 wrapped contracts to support binding arbitration UNDER CONSTRUCTION

License

Notifications You must be signed in to change notification settings

Ethereum-Social-Contract/arbitrable-wrappers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arbitrable Wrapped ERC20/721 tokens

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.
  • Only the specified arbitrator can withdraw tokens from the wrapper (i.e. holders must make a case to the arbitrator to leave)
  • The arbitrator may move tokens between accounts as they decide.
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.
  • Doesn't support tokens from any collection because each collection may implement extensions.

Implications of arbitrable jurisdictions

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.

Installation

$ 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

Testing Contracts

# Build contracts before running tests
$ yarn run build-test
$ yarn run build-dev

$ yarn test

About

ERC20/ERC721 wrapped contracts to support binding arbitration UNDER CONSTRUCTION

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published