Giter Club home page Giter Club logo

kyc-basket-protocol's Introduction

Basket Protocol: KYC Version

KYC Basket Protocol

Build Status Coverage Status

This branch builds off of CoinAlpha's base Basket Protocol.

Quick Reference

Name Description
Basket Protocol CoinAlpha's Basket Protocol used as a base for this repo. For more information on the protocol's base functions, please go to the Basket Protocol repo.
CoinAlpha Releases KYC-Enabled Version of Basket Protocol Blog post discussing regulatory considerations and motivation for the creation of this KYC Version of the Basket Protocol.
KYC.sol A new smart contract module introduced in this version of the Basket Protocol that implements whitelisting rules and functionality.
KYC Admin Ethereum address of a user, who in addition to the protocol creator/administrator, has the ability to whitelist Ethereum addresses.

Overview

This KYC version of the Basket Protocol adds whitelisting functionality: a protocol administrator (owner) and another authorized party, the KYC Admin, have the ability to whitelist Ethereum addresses that will be permitted to hold Basket Tokens.

Only Ethereum addresses that have been whitelisted will be able to hold Basket Tokens; any transfers to or transactions that would involve a transfer to a non-whitelisted address are not permitted and will fail.

KYC Whitelist Module

The KYC.sol contract is introduced in this version of the Basket Protocol to implement the whitelisting functionality.

The main functions are summarized below:

// Query if an address is whitelisted
function isWhitelistedHolder(address _holder) public view returns (bool)
// Function to whitelist an Ethereum address
function whitelistHolder(address _addressToWhitelist) public onlyOwnerOrAdmin returns (bool) 
// Function to remove an address from the whitelist
function unWhitelistHolder(address _addressToUnwhitelist) public onlyOwnerOrAdmin returns (bool)

Dependencies on KYC.sol

The contracts which involve potential transfers of Baskets Tokens (namely Basket.sol and, indirectly, BasketEscrow.sol - via its interaction with Basket.sol) connect to KYC.sol to verify validity of the recipient Ethereum address.


Testing

$ truffle install -g [email protected]
Truffle v4.1.5 (core: 4.1.5)
Solidity v0.4.21 (solc-js)

Run test

$ npm test

Running test coverage (solidity-coverage)

# Requires environment variable TEST_COVERAGE=true, which is set in the npm script:
npm run coverage

Deployment

  • Specify DEPLOYER_ADDRESS and KYC_ADMIN address in config.js
# Ropsten Deployment
npm run deploy:ropsten
# Mainnet Deployment
npm run deploy:mainnet

Security

The CoinAlpha team, to the extent possible, aims to follow industry best practices and keep up to date with the rapidly developing field of smart contracts and blockchain engineering. Some of the guides and best practices followed include:

🐞 Bug Bounty Program

We are also running a bug bounty program. If you find a security issue, please email [email protected]. For more information on the Bug Bounty program, click here: Basket Protocol Bug Bounty Program

Contributions Are Welcome!

We welcome code contributions (via pull requests) as well as bug reports and feature requests through github issues. You may also contact us by email.

Contact

The Basket Protocol was created by CoinAlpha. You can contact us at [email protected].

License

Code released under the Apache-2.0 License.

kyc-basket-protocol's People

Contributors

carlolm avatar fengtality avatar yzhang1994 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.