It's final project for 1112 NCNU CSIE "Principles and Practice of Blockchains"
We have implemented a Crypto Credit Card System consisting of two smart contracts: Soulbound Token and Bank.
We have implemented a simple Soulbound Token (SBT), which is non-transferable. The SBT logs all credit-related activities, including borrowing, repaying, and warning events.
After minting your own SBT, you can register with any bank that trusts this SBT. Each bank can access the client's credit information to establish a credit limit. The registered client can then call the bank's pay() function to request the bank to make payments to the shop on their behalf. The client will repay the bank once they are able to cover the outstanding balance.
Additionally, we have implemented a web interface for interacting with this repository. You can find the web interface repository here.
- Open Ganache on your localhost
- clone this repo
git clone $THIS_REPO_LINK
- Install the project dependencies:
cd Credit-Card-System-smartcontract npm install
- Open the Truffle console
truffle console
- Deploy the contracts in the Truffle console:
truffle(development)> deploy
- Once the contracts are deployed, you can set up and interact with the web interface repository here.