Code Monkey home page Code Monkey logo

smart-contracts's Introduction

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

smart-contracts's People

Contributors

darshprotocol avatar devarogundade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

bunsdev defi-2022

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.