← click here to see all projects

Bank Protocol

This is a framework for managing collateral-backed loans on Ethereum using configurable parameters.


On deployment, the bank owner specifies the following parameters: - Debt Token: This is the token users borrow from the bank (i.e. USDC) - Collateral Token: This is the token the bank accepts as collateral (i.e. TRB) - Interest Rate: The annual interest rate the bank charges borrowers - Origination Fee: The fixed fee charged to borrowers - Collateralization Ratio: The loan-to-value amount borrowers must maintain to avoid a liquidation - Liquidation Penalty: The fixed fee charged to borrowers who get liquidated Once deployed, the bank owner must deposit some debt tokens into the bank's reserve. After depositing debt tokens, users can deposit collateral tokens and borrow the bank's debt tokens. During the borrow, the borrower is charged an origination fee and then interest will accumulate until they repay what they've borrowed plus interest and fees. If at anytime the price of the collateral falls, then the bank owner will liquidate the borrowers collateral to repay their debt. The project I am submitted includes the smart contract code, test suite, and a DApp all designed to be extended and deployed by anyone interested in offering loans on Ethereum.

How It's Made

This project is a smart contract and DApp that was built using Truffle Suite. The price feed for the collateral backed loans uses the Tellor Oracle. The DApp uses HTML, CSS, and Javascript. The smart contract was deployed to the Rinkeby testnet and used DAI and Tellor Tributes as the ERC20 tokens to power the lending and borrowing.

← click here to see all projects