mirror of https://github.com/nucypher/nucypher.git
4a71c70b45 | ||
---|---|---|
nkms_eth | ||
scripts | ||
tests | ||
.gitignore | ||
Pipfile | ||
Pipfile.lock | ||
README.md | ||
install.sh | ||
setup.py |
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 typeDispatcher
contract is proxy which used for updating versions of any contract. See README.MD