npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@traderjoe-xyz/lending

v0.10.0

Published

Banker Joe Lending Protocol

Downloads

50

Readme

CircleCI

Cream Finance

C.R.E.A.M. Finance is a blockchain agnostic, decentralized peer to peer lending platform based on a fork of Compound Finance.

C.R.E.A.M. bridges liquidity across underserved assets by providing algorithmic money markets to these underserved assets. Users can supply any supported assets and use these supplied assets as collateral to borrow any other supported assets. C.R.E.A.M. has launched on Ethereum and Binance Smart Chain.

Before getting started with this repo, please read the Compound protocol repo

Installation

git clone https://github.com/CreamFi/compound-protocol
cd compound-protocol
yarn install --lock-file # or `npm install`

Building

yarn compile

Testing

Jest contract tests are defined under the tests directory. To run the tests run:

yarn test

Branch

master - deployed on ethereum mainnet

bsc - deployed on binance smart chain

cream-v2 - (ironbank) deployed on ethereum mainnet

fantom_time_based - deployed on fantom opera

polygon - depolyed on polygon

arbitrum - deployed on arbitrum

Audits

C.R.E.A.M. Finance smart contracts have been audited by Trail of Bits. The audit report is available on Trail of Bits publications repo.

Change Logs

C.R.E.A.M. Finance forked from this commit 7561dcf5964527dbf2f3c7cd670775b3c6f7e378 of Compound Finance, Cream continues to add new features and submits pull requests back to Compound as appropriate. Below is a high level summary of the changes:

  • Add borrow cap feature, this feature is cherry picked from Compound Finance https://github.com/compound-finance/compound-protocol/pull/65

    • Add a borrow cap check in Comptroller's borrowAllowed hook, disallow further borrowing if an market's totalBorrows reaches its borrow cap
  • Add supply cap feature, implemented in Comptroller.sol, CCapableErc20.sol

    • Add a supply cap check in Comptroller's mintAllowed hook, disallow further minting (supplying) if an market's cash + totalBorrows reaches its supply cap
    • CCapableErc20 tracks cash by itself instead of using balanceOf of underlying token. This avoids direct transfering to cToken to manipulate cash.
    • Need to update cToken's implementation to enable this feature.
  • Add collateral cap feature, implemented in Comptroller.sol, CCollateralCapErc20.sol

    • Add a collateral cap to determine the maximum balance to be considered as collateral. If the cap is reached, users could still supply the asset but it can't be used as collateral.
    • The maximum borrow power of this kind of asset is roughly collateralCap * collateralFactor.
    • Need to update cToken's implementation to enable this feature.
  • Add CWrappedNative to replace old CEther

    • CWrappedNative could support both the native token and the wrapped native token.
    • Users could choose the native token or the wrapped native token when supplying / borrowing / redeeming / repaying.
  • Support earning sushi LP tokens. Implemented in CSLPDelegate.sol

    • CSLP deposit/withdraw sushi lp token to/from sushi MasterChef when doTransferIn/doTrasnferOut
    • Suppliers can use sushi LP tokens as collateral
    • Suppliers can claim sushi reward or borrow interest
  • Support claiming COMP earned from holding CTokens. Implemented in CCTokenDelegate.sol

    • CCToken collects Compound reward and supplier can use claimComp function to claim their reward

BSC

  • Update price oracle implementation to support BAND.
  • Support protocol to protocol borrowing without collateral, this gives whitelisted protocol borrows up to credit limit without collateral.
    • add credit limit in Comptroller.sol
    • When setup a credit limit, it also needs to specify the borrow markets.

IronBank

  • Support protocol to protocol borrowing without collateral, this gives whitelisted protocol borrows up to credit limit without collateral.
    • add credit limit in Comptroller.sol
    • remove repayBorrowBehalf, so that protocol can track their debt easily.
  • Patch as part of the update in the Alpha Homora v2 exploit, excluding stolen funds from interest calculation.
    • CToken.sol on cream-v2-no-interest branch
    • Apply on cyWETH, cyUSDC, cyUSDT, cyDAI