Git Product home page Git Product logo

morpholabs's Introduction

Morpholabs

I used Web3.py,Infura,Chainlink,Coumpound and Etherscan.

First of all, I would like to congratulate the French on their fantastic fundraising. I heard about this protocol some time ago but it is only recently that I went into it technically. Morpholabs is a protocol that created a layer on top of the Compound protocol to connect borrowers and providers in a direct way. In this way rewards are maximised as the interests paid by a borrower aren't divided between all suppliers.

So I made this code to answer at this question 'What are the top 10 users in dollars matched P2P (borrow and supply) at a given block?'. I took it like a challenge, I made investigations on the docs of morpholabs and Compound. I tested several functions on etherscan of the smart contracts of Morpholabs' proxy and Compound's ctokens.

I wrote getRedeemRateCtoken(addressCtoken) function but it is useless cause I was thinking getCurrentBorrowBalanceInOf().call() and getCurrentSupplyBalanceInOf().call() returned ctoken balance.

Method

I collected all the addresses that had interacted with the morphlab protocol. Then I examined what their P2P balance was for all the markets they had entered (tokens supply or borrow). I totaled the P2P balances multiplied by the price of supply/borrow tokens. I added a block number into all call() functions. This is how I found the top 10 suppliers and borrowers P2P in dollars at a given block.

morpholabs's People

Contributors

marco75116 avatar pierre-portfolio avatar

Watchers

 avatar

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.