Go to file
Kieran Prasch 4a71c70b45 [KMS-ETH]- Moves populus config logic to external module and class. 2018-02-27 19:10:10 -08:00
nkms_eth [KMS-ETH]- Moves populus config logic to external module and class. 2018-02-27 19:10:10 -08:00
scripts [KMS-ETH]- Transaction timeout via token.transact(); Updates example scripts. 2018-02-24 12:49:24 -08:00
tests [KMS-ETH]- Adds get_swarm method to fetch all miners with an iterator via smart contracts calls. 2018-02-26 19:12:24 -08:00
.gitignore [KMS-ETH]- Threadlocal blockchain class to interface with populus and local chains. 2018-02-24 12:37:39 -08:00
Pipfile [KMS-ETH]- Ports deps to pipenv: system deps, pipenv, and solc install run from bash installer. 2018-02-24 12:35:48 -08:00
Pipfile.lock [KMS-ETH]- Ports deps to pipenv: system deps, pipenv, and solc install run from bash installer. 2018-02-24 12:35:48 -08:00
README.md [KMS-ETH]- Removed MineableToken, simplified minting 2018-02-07 20:04:41 +03:00
install.sh [KMS-ETH]- Rollback solidity version. 2018-02-27 19:09:15 -08:00
setup.py [KMS-ETH]- Ports deps to pipenv: system deps, pipenv, and solc install run from bash installer. 2018-02-24 12:35:48 -08:00

README.md

NuCypher KMS Ethereum

Ethereum (solidity) code for nucypher-kms, consists contracts and python classes for miners and clients. Part of contracts was copied from OpenZeppelin repo. The basis is built on the Populus framework.

Install

See setup.sh

Periods structure

Most of the function in contracts works by periods. For example, stake in the contract Escrow is discretely unlocked by periods. Period is calculating using block.timestamp in getCurrentPeriod() function (Miner.sol). Each period is 24 hours. So result of getting locked tokens in one day will be the same.

Main contracts

  • Token contract
    NuCypherKMSToken contract is ERC20 token with additional function - burn own tokens (only for owners)
  • Miner contract
    Escrow contract holds stake from miners, store information about miners activity and assigns a reward for participating in NuCypher KMS network
  • Client contract
    PolicyManager contract holds policies fee and distributes fee by periods

Python client

TBD

Solidity libraries

  • LinkedList library is structure of linked list for address data type
  • Dispatcher contract is proxy which used for updating versions of any contract. See README.MD