muame-amr / Regulation-Smart-Contract

Simple ethereum smart contract for banks to regulate their clients' transaction and alert any suspicious activities such as money laundering.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Forks Stargazers Issues MIT License

About The Project

A smart contract which assumes the basic role of a cryptocurrency regulator (eg Bank Negara/Central Bank/Securities Commission). A regulator must be able to detect suspicious transactions and the suspects involved, as well as report them.

Built With

  • Solidity - an object-oriented, high-level language for implementing smart contracts.
  • Remix IDE - a browser-based compiler and IDE that enables users to build Ethereum contracts with Solidity language and to debug transactions.
  • Truffle - a development environment, testing framework and asset pipeline for Ethereum.
  • Ganache - personal blockchain for Ethereum development.

Contribution

Name Part/Contribution
Amiruddin Create setManager, joinAsClientDeposit, deposit function
Danial Create getContractBalance, checkBalance and withdraw function
Final Part Both of us work together by combining the coding to make it work, deploy it in Ganache and completing the report.

Scenarios

  1. Contract created on the blockchain by a cryptocurrency regulator

  1. Set a regulator's address (eg: 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4)

  1. Regulator sets the transaction threshold (eg: 20 ether)

  1. Normal transactions - Good-day behaviour

    • Normal transaction - Deposit 19 ether (not exceeding threshold)
    • Normal transaction - withdraw ether not exceeding the threshold
    • Alert message - nothing suspicious
  2. Huge transaction amount

    • Deposit 21 ether (exceeding threshold value)
    • Withdraw exceeding threshold value
    • Alert the regulator of the suspicious transaction with the involved account address and amount transfered.
  3. Crypto Laundering

    • Alert the regulator of potential money laundering when the ether in the contract exceeded the maximum balance (50 ether). List account involved in the transaction

Deployment on ganache

  • Contract creation on ganache local blockchain

License

Distributed under the MIT License. See LICENSE for more information.

Contact

About

Simple ethereum smart contract for banks to regulate their clients' transaction and alert any suspicious activities such as money laundering.

License:MIT License


Languages

Language:JavaScript 53.8%Language:Solidity 46.2%