Skip to content

darshprotocol/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project detail

Name

Darsh Protocol

About

Darsh's mission is to create a socialized way of lending and borrowing while maintaining DeFi's autonomy and permissionlessness by offering a decentralized peer to peer way for any individual to engage as a lender or borrower.

Our main goal is to provide an efficient and sustainable way for lenders to maximize their rewards on supplied asset by enabling them the ability to structure their loan terms while also removing the risk of an unexpected liquidation of a borrower's collateralized loan all being settled on-chain in a fully decentralized manner.

Links

website | documentation | figma design | devpost

Flow diagram

Loan Diagram view full flow diagram

Features

Terms Structuring: Lenders are enabled to create offers with sets of predetermined loan terms, specifying the principal amount and asset type (ERC20), Collateral types, Loan duration, interest rate demanded to be met by a potential borrower.

Asset Vaulting: the principal supplied by a Lender is locked into a principal vault accessible to the lender anytime. The vault serves as a decentralized escrow between a lender and borrowers.

On-Chain matching: loan offers funded by lenders are matched and settled with a borrower once countersigned, all happening seamlessly with all transactions recorded and fully verifiable on-chain.

Loan Managing: on approving and creating a loan offer, lenders are assigned the full authority to a created loan offer of actions like settling borrow requests, repayments claiming, asset vault management all achievable on-chain.

Offer Bidding: on a lend loan offer, borrowers are allowed to directly request for a borrow loan offer with loan terms relative to the lend loan initially offered by a lender.

Permissionless Borrowing: principals can be borrowed by borrowers permissionlessly from a lend loan offer created by a lender, once the loan terms demanded are met.

Customed Repayment: loan repayments are ease for borrowers to reassess their collateralized asset anytime once repaid. Repayments can be paid in proportions or once within the loan duration specified.

learn more

LendingPool contract

The LendingPool contract is the main point of interaction with the DARSH protocol's market.

Users can:

  • Create Lending/Borrowing offers
  • Request for new terms on offers
  • Repay (Fully/Installment)
  • Claim principal and earnings
  • Claim back collateral
  • Cancel/Reject/Accept requests
  • and more.

Admin can:

  • Liquidate matured loans
  • Withdraw accrued fees
  • Change owner
  • Update configs

view contract on explorer

Supported tokens

ftm eth usdt btc dai usdc

Governance [Coming soon]

darsh

| Darsh Token | DSH |

This ensures the protocol can rapidly adjust to changing market conditions, as well as update core parts of the protocol as time goes on.

DARSH token holders will receive governance powers proportionally to their balance.

The governance power which is used to vote for or against existing proposals, and gives access to creating and sustaining a proposal.

Revenue model

A platform fee of 5% will be deducted from interests paid by borrowers.

More revenue models will be introduced as we grow and unlock more use cases to our users.

Sneak peaks

Desktop - 100 (1) Desktop - 102 Desktop - 83

checkout full demo here

Development

Create a .env like the .env-example and update with valid keys and mnemonic/phrase or private key

  • Compile contracts

truffle compile

  • Migrate contracts

truffle migrate --network=testnet|mainnet --compile-none

  • Set configs

truffle test --network=testnet|mainnet --compile-none --t1

  • Run test

truffle test --network=testnet|mainnet --compile-none --f2

  • Verify contracts

truffle verify --network=testnet|mainnet --license=MIT

  • Run frontend

npm run dev

  • Start node backend

npm run start

Stacks

Smart contract Frontend Backend Design Cloud services
Truffle and plugins Vuejs Expressjs Figma Netlify
Web3js Web3js Web3js Render
Covalent API Moralis Stream
Jazzicon Mongodb

Languages

  • Solidity
  • Javascript
  • HTML/CSS

Dependencies

  • Chainlink Price Feed
  • Openzeppelin

Team

Arogundade Ibrahim

Position: Web3 Fullstack Developer

contact me

Awolola Idowu

Position: UI/UX Designer

contact me