✨ New!✨  C4 Cosmos leagueRead more »

Contest ran April 29May 4

6 day contest

Based Loans contest

Compound's degenerate brother

$30,000 USDC

Total Awards

Based Loans contest details

This repo will be made public before the start of the contest.

Based Loans is fork of Compound. In theory it should inherit Compound's security. However, any change made to smart contracts can introduce a critical bug. To make it easier for auditors, below is a summary of changes. Be aware that these are not all changes. Do code diff with compound contract to see all changes made.

If you are not familiar with Compound, feel free to read their documentation https://compound.finance/docs Compound's original code is here: https://github.com/compound-finance/compound-protocol/tree/master

Changelog:

  • doTransferOut function in CEther.sol
  • Renamed Comp.sol to Blo.sol. Be aware that renaming was made only in few places. Across the code, you'll see variables and functions referencing blo and comp so keep in mind, it means the same thing (token).
  • UniswapAnchoredView.sol contract
  • UniswapConfig.sol contract
  • CErc20Immutable.sol and CToken.sol contracts - mostly function visibility to accommodate new TWAP oracle with on-fly price updates
  • _setCompAddress function in Comptroller.sol - new setter and corresponding storage changes in ComptrollerStorage
  • Moved doTransferOut after storage update in CToken.sol for:
    • _reduceReservesFresh
    • redeemFresh
    • borrowFresh