DeFiPie - Smart Contract Audit Report

Summary

DeFiPie Audit Report DeFiPie aims to create a financial system that is open to everyone and minimizes the need to rely on central authorities. DeFiPie combines Lending-as-a-Service, Liquidity Pool-as-a-Service, and Staking-as-a-Service all in one platform.

DeFiPie's platform allow users to deposit idle assets to earn interest via lending; and to borrow against collateralized assets to gain access to additional capital. We audited DeFiPie's contracts, accessible at the following link, at commit 1d0d869310c521ae4f42d86e1f511723ab03ea1a on Github. The team appears to have only made minor changes since then.

Audit Findings:
  • Oracle pricing for the project comes from Uniswap's TWAPs (time-weighted average prices), which cannot be manipulated by flash loan attacks.
  • Some functions use tx.origin instead of msg.sender. This is not best in line with solidity best practices (SWC-115), but it prevents contracts from accessing some functions.
  • Admins of the project have the ability to pause features of the platform. Ensure trust in the team; they are public and their actions thus far have proven trustworthy.
  • No security issues from outside attackers were identified.
  • Date: November 30th, 2020

We ran over 400,000 transactions interacting with this suite of contracts on a test blockchain to determine these results.
Date: November 30th, 2020
Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Deprecated OpcodesN/APASS
Ether ThiefN/APASS
ExceptionsN/APASS
External CallsN/APASS
Integer Over/UnderflowN/APASS
Multiple SendsN/APASS
Smart Contract Weakness ClassificationSWC-115 (tx.origin is used, which is not best practice.
No security issue is posed by this, however.)
Warning
SuicideN/APASS
State Change External CallsN/APASS
Unchecked RetvalN/APASS
User Supplied AssertionN/APASS
Critical Solidity CompilerN/APASS
Overall Contract Safety PASS

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  ControllerInterface 
    - [Ext] enterMarkets #
    - [Ext] exitMarket #
    - [Ext] mintAllowed #
    - [Ext] mintVerify #
    - [Ext] redeemAllowed #
    - [Ext] redeemVerify #
    - [Ext] borrowAllowed #
    - [Ext] borrowVerify #
    - [Ext] repayBorrowAllowed #
    - [Ext] repayBorrowVerify #
    - [Ext] liquidateBorrowAllowed #
    - [Ext] liquidateBorrowVerify #
    - [Ext] seizeAllowed #
    - [Ext] seizeVerify #
    - [Ext] transferAllowed #
    - [Ext] transferVerify #
    - [Ext] liquidateCalculateSeizeTokens
    - [Ext] getOracle

 +  InterestRateModel 
    - [Ext] getBorrowRate
    - [Ext] getSupplyRate

 + [Int] RegistryInterface 
    - [Ext] admin
    - [Ext] pTokenImplementation
    - [Ext] addPToken #
    - [Ext] addPETH #
    - [Ext] addPPIE #

 +  ProxyWithRegistryStorage 

 +  ProxyWithRegistryInterface (ProxyWithRegistryStorage)
    - [Int] _setRegistry #
    - [Int] _pTokenImplementation

 +  ProxyWithRegistry (ProxyWithRegistryInterface)
    - [Int] _pTokenImplementation
    - [Int] _setRegistry #

 +  ImplementationStorage 
    - [Int] _setImplementation #

 +  PTokenStorage (ProxyWithRegistryStorage)

 +  PTokenInterface (PTokenStorage)
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
    - [Ext] borrowBalanceCurrent #
    - [Pub] borrowBalanceStored
    - [Pub] exchangeRateCurrent #
    - [Pub] exchangeRateStored
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Ext] seize #
    - [Pub] _setController #
    - [Ext] _setReserveFactor #
    - [Ext] _reduceReserves #
    - [Pub] _setInterestRateModel #

 +  PErc20Storage 

 +  PErc20Interface (PErc20Storage)
    - [Ext] mint #
    - [Ext] redeem #
    - [Ext] redeemUnderlying #
    - [Ext] borrow #
    - [Ext] repayBorrow #
    - [Ext] repayBorrowBehalf #
    - [Ext] liquidateBorrow #
    - [Ext] _addReserves #

 +  PPIEStorage 

 +  PPIEInterface (PPIEStorage)
    - [Ext] delegate #
    - [Ext] delegateBySig #
    - [Ext] getCurrentVotes
    - [Ext] getPriorVotes

 + [Int] EIP20Interface 
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 + [Int] EIP20NonStandardInterface 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 +  CarefulMath 
    - [Int] mulUInt
    - [Int] divUInt
    - [Int] subUInt
    - [Int] addUInt
    - [Int] addThenSubUInt

 +  Exponential (CarefulMath)
    - [Int] getExp
    - [Int] addExp
    - [Int] subExp
    - [Int] mulScalar
    - [Int] mulScalarTruncate
    - [Int] mulScalarTruncateAddUInt
    - [Int] divScalar
    - [Int] divScalarByExp
    - [Int] divScalarByExpTruncate
    - [Int] mulExp
    - [Int] mulExp
    - [Int] mulExp3
    - [Int] divExp
    - [Int] truncate
    - [Int] lessThanExp
    - [Int] lessThanOrEqualExp
    - [Int] greaterThanExp
    - [Int] isZeroExp
    - [Int] safe224
    - [Int] safe32
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] fraction

 +  PriceOracle 
    - [Ext] getUnderlyingPrice
    - [Ext] updateUnderlyingPrice #

 +  ControllerErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  TokenErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  OracleErrorReporter 
    - [Int] fail #

 +  FactoryErrorReporter 
    - [Int] fail #

 +  RegistryErrorReporter 
    - [Int] fail #

 +  UnitrollerAdminStorage 

 +  ControllerStorage (UnitrollerAdminStorage)

 +  Unitroller (UnitrollerAdminStorage, ControllerErrorReporter)
    - [Pub]  #
    - [Pub] _setPendingImplementation #
    - [Pub] _acceptImplementation #
    - [Pub] _setPendingAdmin #
    - [Pub] _acceptAdmin #
    - [Ext]  ($)
    - [Ext]  ($)

 +  Pie 
    - [Pub]  #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Int] _transferTokens #
    - [Int] safe96
    - [Int] add96
    - [Int] sub96
    - [Int] getChainId

 +  PToken (PTokenInterface, Exponential, TokenErrorReporter)
    - [Pub] initialize #
    - [Int] transferTokens #
    - [Ext] transfer #
       - modifiers: nonReentrant
    - [Ext] transferFrom #
       - modifiers: nonReentrant
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Int] getBlockNumber
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
       - modifiers: nonReentrant
    - [Ext] borrowBalanceCurrent #
       - modifiers: nonReentrant
    - [Pub] borrowBalanceStored
    - [Int] borrowBalanceStoredInternal
    - [Pub] exchangeRateCurrent #
       - modifiers: nonReentrant
    - [Pub] exchangeRateStored
    - [Int] exchangeRateStoredInternal
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Int] mintInternal #
       - modifiers: nonReentrant
    - [Int] mintFresh #
    - [Int] redeemInternal #
       - modifiers: nonReentrant
    - [Int] redeemUnderlyingInternal #
       - modifiers: nonReentrant
    - [Int] redeemFresh #
    - [Int] borrowInternal #
       - modifiers: nonReentrant
    - [Int] borrowFresh #
    - [Int] repayBorrowInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowBehalfInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowFresh #
    - [Int] liquidateBorrowInternal #
       - modifiers: nonReentrant
    - [Int] liquidateBorrowFresh #
    - [Ext] seize #
       - modifiers: nonReentrant
    - [Int] seizeInternal #
    - [Pub] _setController #
    - [Int] _setControllerInternal #
    - [Ext] _setReserveFactor #
       - modifiers: nonReentrant
    - [Int] _setReserveFactorFresh #
    - [Int] _addReservesInternal #
       - modifiers: nonReentrant
    - [Int] _addReservesFresh #
    - [Ext] _reduceReserves #
       - modifiers: nonReentrant
    - [Int] _reduceReservesFresh #
    - [Pub] _setInterestRateModel #
    - [Int] _setInterestRateModelFresh #
    - [Int] _setInterestRateModelFreshInternal #
    - [Pub] getMyAdmin
    - [Int] getCashPrior
    - [Int] doTransferIn #
    - [Int] doTransferOut #

 +  Controller (ControllerStorage, ControllerInterface, ControllerErrorReporter, Exponential)
    - [Pub]  #
    - [Ext] getAssetsIn
    - [Ext] checkMembership
    - [Pub] enterMarkets #
    - [Int] addToMarketInternal #
    - [Ext] exitMarket #
    - [Ext] mintAllowed #
    - [Ext] mintVerify #
    - [Ext] redeemAllowed #
    - [Int] redeemAllowedInternal
    - [Ext] redeemVerify #
    - [Ext] borrowAllowed #
    - [Ext] borrowVerify #
    - [Ext] repayBorrowAllowed #
    - [Ext] repayBorrowVerify #
    - [Ext] liquidateBorrowAllowed #
    - [Ext] liquidateBorrowVerify #
    - [Ext] seizeAllowed #
    - [Ext] seizeVerify #
    - [Ext] transferAllowed #
    - [Ext] transferVerify #
    - [Pub] getAccountLiquidity
    - [Int] getAccountLiquidityInternal
    - [Pub] getHypotheticalAccountLiquidity
    - [Int] getHypotheticalAccountLiquidityInternal
    - [Ext] liquidateCalculateSeizeTokens
    - [Pub] _setPriceOracle #
    - [Pub] _setPieAddress #
    - [Ext] _setCloseFactor #
    - [Ext] _setCollateralFactor #
    - [Ext] _setMaxAssets #
    - [Ext] _setLiquidationIncentive #
    - [Ext] _supportMarket #
    - [Int] _addMarketInternal #
    - [Pub] _setPauseGuardian #
    - [Pub] _setMintPaused #
    - [Pub] _setBorrowPaused #
    - [Pub] _setTransferPaused #
    - [Pub] _setSeizePaused #
    - [Ext] _setFactoryContract #
    - [Pub] _become #
    - [Pub] _become #
    - [Int] adminOrInitializing
    - [Pub] refreshPieSpeeds #
    - [Int] refreshPieSpeedsInternal #
    - [Int] updatePieSupplyIndex #
    - [Int] updatePieBorrowIndex #
    - [Int] distributeSupplierPie #
    - [Int] distributeBorrowerPie #
    - [Int] transferPie #
    - [Pub] claimPie #
    - [Pub] claimPie #
    - [Pub] claimPie #
    - [Pub] _setPieRate #
    - [Pub] _addPieMarkets #
    - [Int] _addPieMarketInternal #
    - [Pub] _dropPieMarket #
    - [Pub] getAllMarkets
    - [Pub] getBlockNumber
    - [Pub] getPieAddress
    - [Pub] getOracle

							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  ControllerInterface 
    - [Ext] enterMarkets #
    - [Ext] exitMarket #
    - [Ext] mintAllowed #
    - [Ext] mintVerify #
    - [Ext] redeemAllowed #
    - [Ext] redeemVerify #
    - [Ext] borrowAllowed #
    - [Ext] borrowVerify #
    - [Ext] repayBorrowAllowed #
    - [Ext] repayBorrowVerify #
    - [Ext] liquidateBorrowAllowed #
    - [Ext] liquidateBorrowVerify #
    - [Ext] seizeAllowed #
    - [Ext] seizeVerify #
    - [Ext] transferAllowed #
    - [Ext] transferVerify #
    - [Ext] liquidateCalculateSeizeTokens
    - [Ext] getOracle

 +  InterestRateModel 
    - [Ext] getBorrowRate
    - [Ext] getSupplyRate

 + [Int] RegistryInterface 
    - [Ext] admin
    - [Ext] pTokenImplementation
    - [Ext] addPToken #
    - [Ext] addPETH #
    - [Ext] addPPIE #

 +  ProxyWithRegistryStorage 

 +  ProxyWithRegistryInterface (ProxyWithRegistryStorage)
    - [Int] _setRegistry #
    - [Int] _pTokenImplementation

 +  ProxyWithRegistry (ProxyWithRegistryInterface)
    - [Int] _pTokenImplementation
    - [Int] _setRegistry #

 +  ImplementationStorage 
    - [Int] _setImplementation #

 +  PTokenStorage (ProxyWithRegistryStorage)

 +  PTokenInterface (PTokenStorage)
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
    - [Ext] borrowBalanceCurrent #
    - [Pub] borrowBalanceStored
    - [Pub] exchangeRateCurrent #
    - [Pub] exchangeRateStored
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Ext] seize #
    - [Pub] _setController #
    - [Ext] _setReserveFactor #
    - [Ext] _reduceReserves #
    - [Pub] _setInterestRateModel #

 +  PErc20Storage 

 +  PErc20Interface (PErc20Storage)
    - [Ext] mint #
    - [Ext] redeem #
    - [Ext] redeemUnderlying #
    - [Ext] borrow #
    - [Ext] repayBorrow #
    - [Ext] repayBorrowBehalf #
    - [Ext] liquidateBorrow #
    - [Ext] _addReserves #

 +  PPIEStorage 

 +  PPIEInterface (PPIEStorage)
    - [Ext] delegate #
    - [Ext] delegateBySig #
    - [Ext] getCurrentVotes
    - [Ext] getPriorVotes

 + [Int] EIP20Interface 
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 + [Int] EIP20NonStandardInterface 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 +  CarefulMath 
    - [Int] mulUInt
    - [Int] divUInt
    - [Int] subUInt
    - [Int] addUInt
    - [Int] addThenSubUInt

 +  Exponential (CarefulMath)
    - [Int] getExp
    - [Int] addExp
    - [Int] subExp
    - [Int] mulScalar
    - [Int] mulScalarTruncate
    - [Int] mulScalarTruncateAddUInt
    - [Int] divScalar
    - [Int] divScalarByExp
    - [Int] divScalarByExpTruncate
    - [Int] mulExp
    - [Int] mulExp
    - [Int] mulExp3
    - [Int] divExp
    - [Int] truncate
    - [Int] lessThanExp
    - [Int] lessThanOrEqualExp
    - [Int] greaterThanExp
    - [Int] isZeroExp
    - [Int] safe224
    - [Int] safe32
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] fraction

 +  PriceOracle 
    - [Ext] getUnderlyingPrice
    - [Ext] updateUnderlyingPrice #

 +  ControllerErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  TokenErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  OracleErrorReporter 
    - [Int] fail #

 +  FactoryErrorReporter 
    - [Int] fail #

 +  RegistryErrorReporter 
    - [Int] fail #

 +  UnitrollerAdminStorage 

 +  ControllerStorage (UnitrollerAdminStorage)

 +  Unitroller (UnitrollerAdminStorage, ControllerErrorReporter)
    - [Pub]  #
    - [Pub] _setPendingImplementation #
    - [Pub] _acceptImplementation #
    - [Pub] _setPendingAdmin #
    - [Pub] _acceptAdmin #
    - [Ext]  ($)
    - [Ext]  ($)

 +  Pie 
    - [Pub]  #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Int] _transferTokens #
    - [Int] safe96
    - [Int] add96
    - [Int] sub96
    - [Int] getChainId

 +  PToken (PTokenInterface, Exponential, TokenErrorReporter)
    - [Pub] initialize #
    - [Int] transferTokens #
    - [Ext] transfer #
       - modifiers: nonReentrant
    - [Ext] transferFrom #
       - modifiers: nonReentrant
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Int] getBlockNumber
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
       - modifiers: nonReentrant
    - [Ext] borrowBalanceCurrent #
       - modifiers: nonReentrant
    - [Pub] borrowBalanceStored
    - [Int] borrowBalanceStoredInternal
    - [Pub] exchangeRateCurrent #
       - modifiers: nonReentrant
    - [Pub] exchangeRateStored
    - [Int] exchangeRateStoredInternal
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Int] mintInternal #
       - modifiers: nonReentrant
    - [Int] mintFresh #
    - [Int] redeemInternal #
       - modifiers: nonReentrant
    - [Int] redeemUnderlyingInternal #
       - modifiers: nonReentrant
    - [Int] redeemFresh #
    - [Int] borrowInternal #
       - modifiers: nonReentrant
    - [Int] borrowFresh #
    - [Int] repayBorrowInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowBehalfInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowFresh #
    - [Int] liquidateBorrowInternal #
       - modifiers: nonReentrant
    - [Int] liquidateBorrowFresh #
    - [Ext] seize #
       - modifiers: nonReentrant
    - [Int] seizeInternal #
    - [Pub] _setController #
    - [Int] _setControllerInternal #
    - [Ext] _setReserveFactor #
       - modifiers: nonReentrant
    - [Int] _setReserveFactorFresh #
    - [Int] _addReservesInternal #
       - modifiers: nonReentrant
    - [Int] _addReservesFresh #
    - [Ext] _reduceReserves #
       - modifiers: nonReentrant
    - [Int] _reduceReservesFresh #
    - [Pub] _setInterestRateModel #
    - [Int] _setInterestRateModelFresh #
    - [Int] _setInterestRateModelFreshInternal #
    - [Pub] getMyAdmin
    - [Int] getCashPrior
    - [Int] doTransferIn #
    - [Int] doTransferOut #

 +  PErc20 (PToken, PErc20Interface)
    - [Pub] initialize #
    - [Ext] mint #
    - [Ext] redeem #
    - [Ext] redeemUnderlying #
    - [Ext] borrow #
    - [Ext] repayBorrow #
    - [Ext] repayBorrowBehalf #
    - [Ext] liquidateBorrow #
    - [Ext] _addReserves #
    - [Int] getCashPrior
    - [Int] doTransferIn #
    - [Int] doTransferOut #

 +  PErc20Delegate (PErc20)
    - [Pub]  #
							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  ControllerInterface 
    - [Ext] enterMarkets #
    - [Ext] exitMarket #
    - [Ext] mintAllowed #
    - [Ext] mintVerify #
    - [Ext] redeemAllowed #
    - [Ext] redeemVerify #
    - [Ext] borrowAllowed #
    - [Ext] borrowVerify #
    - [Ext] repayBorrowAllowed #
    - [Ext] repayBorrowVerify #
    - [Ext] liquidateBorrowAllowed #
    - [Ext] liquidateBorrowVerify #
    - [Ext] seizeAllowed #
    - [Ext] seizeVerify #
    - [Ext] transferAllowed #
    - [Ext] transferVerify #
    - [Ext] liquidateCalculateSeizeTokens
    - [Ext] getOracle

 +  InterestRateModel 
    - [Ext] getBorrowRate
    - [Ext] getSupplyRate

 + [Int] RegistryInterface 
    - [Ext] admin
    - [Ext] pTokenImplementation
    - [Ext] addPToken #
    - [Ext] addPETH #
    - [Ext] addPPIE #

 +  ProxyWithRegistryStorage 

 +  ProxyWithRegistryInterface (ProxyWithRegistryStorage)
    - [Int] _setRegistry #
    - [Int] _pTokenImplementation

 +  ProxyWithRegistry (ProxyWithRegistryInterface)
    - [Int] _pTokenImplementation
    - [Int] _setRegistry #

 +  ImplementationStorage 
    - [Int] _setImplementation #

 +  PTokenStorage (ProxyWithRegistryStorage)

 +  PTokenInterface (PTokenStorage)
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
    - [Ext] borrowBalanceCurrent #
    - [Pub] borrowBalanceStored
    - [Pub] exchangeRateCurrent #
    - [Pub] exchangeRateStored
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Ext] seize #
    - [Pub] _setController #
    - [Ext] _setReserveFactor #
    - [Ext] _reduceReserves #
    - [Pub] _setInterestRateModel #

 +  PErc20Storage 

 +  PErc20Interface (PErc20Storage)
    - [Ext] mint #
    - [Ext] redeem #
    - [Ext] redeemUnderlying #
    - [Ext] borrow #
    - [Ext] repayBorrow #
    - [Ext] repayBorrowBehalf #
    - [Ext] liquidateBorrow #
    - [Ext] _addReserves #

 +  PPIEStorage 

 +  PPIEInterface (PPIEStorage)
    - [Ext] delegate #
    - [Ext] delegateBySig #
    - [Ext] getCurrentVotes
    - [Ext] getPriorVotes

 + [Int] EIP20Interface 
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 + [Int] EIP20NonStandardInterface 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 +  CarefulMath 
    - [Int] mulUInt
    - [Int] divUInt
    - [Int] subUInt
    - [Int] addUInt
    - [Int] addThenSubUInt

 +  Exponential (CarefulMath)
    - [Int] getExp
    - [Int] addExp
    - [Int] subExp
    - [Int] mulScalar
    - [Int] mulScalarTruncate
    - [Int] mulScalarTruncateAddUInt
    - [Int] divScalar
    - [Int] divScalarByExp
    - [Int] divScalarByExpTruncate
    - [Int] mulExp
    - [Int] mulExp
    - [Int] mulExp3
    - [Int] divExp
    - [Int] truncate
    - [Int] lessThanExp
    - [Int] lessThanOrEqualExp
    - [Int] greaterThanExp
    - [Int] isZeroExp
    - [Int] safe224
    - [Int] safe32
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] fraction

 +  PriceOracle 
    - [Ext] getUnderlyingPrice
    - [Ext] updateUnderlyingPrice #

 +  ControllerErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  TokenErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  OracleErrorReporter 
    - [Int] fail #

 +  FactoryErrorReporter 
    - [Int] fail #

 +  RegistryErrorReporter 
    - [Int] fail #

 +  UnitrollerAdminStorage 

 +  ControllerStorage (UnitrollerAdminStorage)

 +  Unitroller (UnitrollerAdminStorage, ControllerErrorReporter)
    - [Pub]  #
    - [Pub] _setPendingImplementation #
    - [Pub] _acceptImplementation #
    - [Pub] _setPendingAdmin #
    - [Pub] _acceptAdmin #
    - [Ext]  ($)
    - [Ext]  ($)

 +  Pie 
    - [Pub]  #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Int] _transferTokens #
    - [Int] safe96
    - [Int] add96
    - [Int] sub96
    - [Int] getChainId

 +  PToken (PTokenInterface, Exponential, TokenErrorReporter)
    - [Pub] initialize #
    - [Int] transferTokens #
    - [Ext] transfer #
       - modifiers: nonReentrant
    - [Ext] transferFrom #
       - modifiers: nonReentrant
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Int] getBlockNumber
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
       - modifiers: nonReentrant
    - [Ext] borrowBalanceCurrent #
       - modifiers: nonReentrant
    - [Pub] borrowBalanceStored
    - [Int] borrowBalanceStoredInternal
    - [Pub] exchangeRateCurrent #
       - modifiers: nonReentrant
    - [Pub] exchangeRateStored
    - [Int] exchangeRateStoredInternal
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Int] mintInternal #
       - modifiers: nonReentrant
    - [Int] mintFresh #
    - [Int] redeemInternal #
       - modifiers: nonReentrant
    - [Int] redeemUnderlyingInternal #
       - modifiers: nonReentrant
    - [Int] redeemFresh #
    - [Int] borrowInternal #
       - modifiers: nonReentrant
    - [Int] borrowFresh #
    - [Int] repayBorrowInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowBehalfInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowFresh #
    - [Int] liquidateBorrowInternal #
       - modifiers: nonReentrant
    - [Int] liquidateBorrowFresh #
    - [Ext] seize #
       - modifiers: nonReentrant
    - [Int] seizeInternal #
    - [Pub] _setController #
    - [Int] _setControllerInternal #
    - [Ext] _setReserveFactor #
       - modifiers: nonReentrant
    - [Int] _setReserveFactorFresh #
    - [Int] _addReservesInternal #
       - modifiers: nonReentrant
    - [Int] _addReservesFresh #
    - [Ext] _reduceReserves #
       - modifiers: nonReentrant
    - [Int] _reduceReservesFresh #
    - [Pub] _setInterestRateModel #
    - [Int] _setInterestRateModelFresh #
    - [Int] _setInterestRateModelFreshInternal #
    - [Pub] getMyAdmin
    - [Int] getCashPrior
    - [Int] doTransferIn #
    - [Int] doTransferOut #

 +  PEther (ImplementationStorage, PToken)
    - [Pub] initialize #
    - [Ext] mint ($)
    - [Ext] redeem #
    - [Ext] redeemUnderlying #
    - [Ext] borrow #
    - [Ext] repayBorrow ($)
    - [Ext] repayBorrowBehalf ($)
    - [Ext] liquidateBorrow ($)
    - [Ext]  ($)
    - [Ext]  ($)
    - [Int] getCashPrior
    - [Int] doTransferIn #
    - [Int] doTransferOut #
    - [Int] requireNoError

 +  PEtherDelegate (PEther)
    - [Pub]  #

							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  ProxyWithRegistryStorage 

 +  ProxyWithRegistryInterface (ProxyWithRegistryStorage)
    - [Int] _setRegistry #
    - [Int] _pTokenImplementation

 +  ProxyWithRegistry (ProxyWithRegistryInterface)
    - [Int] _pTokenImplementation
    - [Int] _setRegistry #

 +  ImplementationStorage 
    - [Int] _setImplementation #

 +  PErc20Delegator (ProxyWithRegistry)
    - [Pub]  #
    - [Int] delegateTo #
    - [Int] delegateAndReturn #
    - [Ext]  ($)
    - [Ext]  ($)

 + [Int] RegistryInterface 
    - [Ext] admin
    - [Ext] pTokenImplementation
    - [Ext] addPToken #
    - [Ext] addPETH #
    - [Ext] addPPIE #

 + [Int] EIP20Interface 
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 + [Lib] strings 
    - [Prv] memcpy
    - [Int] toSlice
    - [Int] len
    - [Int] toSliceB32
    - [Int] copy
    - [Int] toString
    - [Int] len
    - [Int] empty
    - [Int] compare
    - [Int] equals
    - [Int] nextRune
    - [Int] nextRune
    - [Int] ord
    - [Int] keccak
    - [Int] startsWith
    - [Int] beyond
    - [Int] endsWith
    - [Int] until
    - [Prv] findPtr
    - [Prv] rfindPtr
    - [Int] find
    - [Int] rfind
    - [Int] split
    - [Int] split
    - [Int] rsplit
    - [Int] rsplit
    - [Int] count
    - [Int] contains
    - [Int] concat
    - [Int] join

 + [Lib] SafeMath 
    - [Int] add
    - [Int] add
    - [Int] sub
    - [Int] sub
    - [Int] mul
    - [Int] mul
    - [Int] div
    - [Int] div
    - [Int] mod
    - [Int] mod

 + [Int] AggregatorInterface 
    - [Ext] latestAnswer

 + [Lib] UQ112x112 
    - [Int] encode
    - [Int] uqdiv

 + [Lib] FixedPoint 
    - [Int] mul
    - [Int] decode144

 + [Int] IUniswapV2Pair 
    - [Ext] token0
    - [Ext] token1
    - [Ext] getReserves
    - [Ext] price0CumulativeLast
    - [Ext] price1CumulativeLast

 + [Int] IUniswapV2Factory 
    - [Ext] getPair

 +  ControllerErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  TokenErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  OracleErrorReporter 
    - [Int] fail #

 +  FactoryErrorReporter 
    - [Int] fail #

 +  RegistryErrorReporter 
    - [Int] fail #

 +  PETHDelegator (ImplementationStorage, ProxyWithRegistry)
    - [Pub]  #
    - [Int] delegateTo #
    - [Prv] delegateAndReturn #
    - [Ext]  ($)
    - [Ext]  ($)

 +  PPIEDelegator (ImplementationStorage, ProxyWithRegistry)
    - [Pub]  #
    - [Int] delegateTo #
    - [Int] delegateAndReturn #
    - [Ext]  ($)
    - [Ext]  ($)

 + [Int] Icontroller 
    - [Ext] _supportMarket #

 + [Int] IUniswapPriceOracle 
    - [Ext] update #
    - [Ext] getUniswapPair

 +  PTokenFactory (FactoryErrorReporter)
    - [Pub]  #
    - [Ext] createPToken #
    - [Ext] createPETH #
    - [Ext] createPPIE #
    - [Pub] reserveIsEnough
    - [Pub] setMinUniswapLiquidity #
    - [Pub] setOracle #
    - [Ext] setController #
    - [Ext] setInterestRateModel #
    - [Ext] setInitialExchangeRateMantissa #
    - [Ext] setInitialReserveFactorMantissa #
    - [Pub] getAdmin
    - [Int] _createPTokenNameAndSymbol

							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  ControllerInterface 
    - [Ext] enterMarkets #
    - [Ext] exitMarket #
    - [Ext] mintAllowed #
    - [Ext] mintVerify #
    - [Ext] redeemAllowed #
    - [Ext] redeemVerify #
    - [Ext] borrowAllowed #
    - [Ext] borrowVerify #
    - [Ext] repayBorrowAllowed #
    - [Ext] repayBorrowVerify #
    - [Ext] liquidateBorrowAllowed #
    - [Ext] liquidateBorrowVerify #
    - [Ext] seizeAllowed #
    - [Ext] seizeVerify #
    - [Ext] transferAllowed #
    - [Ext] transferVerify #
    - [Ext] liquidateCalculateSeizeTokens
    - [Ext] getOracle

 +  InterestRateModel 
    - [Ext] getBorrowRate
    - [Ext] getSupplyRate

 + [Int] RegistryInterface 
    - [Ext] admin
    - [Ext] pTokenImplementation
    - [Ext] addPToken #
    - [Ext] addPETH #
    - [Ext] addPPIE #

 +  ProxyWithRegistryStorage 

 +  ProxyWithRegistryInterface (ProxyWithRegistryStorage)
    - [Int] _setRegistry #
    - [Int] _pTokenImplementation

 +  ProxyWithRegistry (ProxyWithRegistryInterface)
    - [Int] _pTokenImplementation
    - [Int] _setRegistry #

 +  ImplementationStorage 
    - [Int] _setImplementation #

 +  PTokenStorage (ProxyWithRegistryStorage)

 +  PTokenInterface (PTokenStorage)
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
    - [Ext] borrowBalanceCurrent #
    - [Pub] borrowBalanceStored
    - [Pub] exchangeRateCurrent #
    - [Pub] exchangeRateStored
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Ext] seize #
    - [Pub] _setController #
    - [Ext] _setReserveFactor #
    - [Ext] _reduceReserves #
    - [Pub] _setInterestRateModel #

 +  PErc20Storage 

 +  PErc20Interface (PErc20Storage)
    - [Ext] mint #
    - [Ext] redeem #
    - [Ext] redeemUnderlying #
    - [Ext] borrow #
    - [Ext] repayBorrow #
    - [Ext] repayBorrowBehalf #
    - [Ext] liquidateBorrow #
    - [Ext] _addReserves #

 +  PPIEStorage 

 +  PPIEInterface (PPIEStorage)
    - [Ext] delegate #
    - [Ext] delegateBySig #
    - [Ext] getCurrentVotes
    - [Ext] getPriorVotes

 + [Int] EIP20Interface 
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 + [Int] EIP20NonStandardInterface 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 +  CarefulMath 
    - [Int] mulUInt
    - [Int] divUInt
    - [Int] subUInt
    - [Int] addUInt
    - [Int] addThenSubUInt

 +  Exponential (CarefulMath)
    - [Int] getExp
    - [Int] addExp
    - [Int] subExp
    - [Int] mulScalar
    - [Int] mulScalarTruncate
    - [Int] mulScalarTruncateAddUInt
    - [Int] divScalar
    - [Int] divScalarByExp
    - [Int] divScalarByExpTruncate
    - [Int] mulExp
    - [Int] mulExp
    - [Int] mulExp3
    - [Int] divExp
    - [Int] truncate
    - [Int] lessThanExp
    - [Int] lessThanOrEqualExp
    - [Int] greaterThanExp
    - [Int] isZeroExp
    - [Int] safe224
    - [Int] safe32
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] fraction

 +  PriceOracle 
    - [Ext] getUnderlyingPrice
    - [Ext] updateUnderlyingPrice #

 +  ControllerErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  TokenErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  OracleErrorReporter 
    - [Int] fail #

 +  FactoryErrorReporter 
    - [Int] fail #

 +  RegistryErrorReporter 
    - [Int] fail #

 +  UnitrollerAdminStorage 

 +  ControllerStorage (UnitrollerAdminStorage)

 +  Unitroller (UnitrollerAdminStorage, ControllerErrorReporter)
    - [Pub]  #
    - [Pub] _setPendingImplementation #
    - [Pub] _acceptImplementation #
    - [Pub] _setPendingAdmin #
    - [Pub] _acceptAdmin #
    - [Ext]  ($)
    - [Ext]  ($)

 +  Pie 
    - [Pub]  #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Int] _transferTokens #
    - [Int] safe96
    - [Int] add96
    - [Int] sub96
    - [Int] getChainId

 +  PToken (PTokenInterface, Exponential, TokenErrorReporter)
    - [Pub] initialize #
    - [Int] transferTokens #
    - [Ext] transfer #
       - modifiers: nonReentrant
    - [Ext] transferFrom #
       - modifiers: nonReentrant
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Int] getBlockNumber
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
       - modifiers: nonReentrant
    - [Ext] borrowBalanceCurrent #
       - modifiers: nonReentrant
    - [Pub] borrowBalanceStored
    - [Int] borrowBalanceStoredInternal
    - [Pub] exchangeRateCurrent #
       - modifiers: nonReentrant
    - [Pub] exchangeRateStored
    - [Int] exchangeRateStoredInternal
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Int] mintInternal #
       - modifiers: nonReentrant
    - [Int] mintFresh #
    - [Int] redeemInternal #
       - modifiers: nonReentrant
    - [Int] redeemUnderlyingInternal #
       - modifiers: nonReentrant
    - [Int] redeemFresh #
    - [Int] borrowInternal #
       - modifiers: nonReentrant
    - [Int] borrowFresh #
    - [Int] repayBorrowInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowBehalfInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowFresh #
    - [Int] liquidateBorrowInternal #
       - modifiers: nonReentrant
    - [Int] liquidateBorrowFresh #
    - [Ext] seize #
       - modifiers: nonReentrant
    - [Int] seizeInternal #
    - [Pub] _setController #
    - [Int] _setControllerInternal #
    - [Ext] _setReserveFactor #
       - modifiers: nonReentrant
    - [Int] _setReserveFactorFresh #
    - [Int] _addReservesInternal #
       - modifiers: nonReentrant
    - [Int] _addReservesFresh #
    - [Ext] _reduceReserves #
       - modifiers: nonReentrant
    - [Int] _reduceReservesFresh #
    - [Pub] _setInterestRateModel #
    - [Int] _setInterestRateModelFresh #
    - [Int] _setInterestRateModelFreshInternal #
    - [Pub] getMyAdmin
    - [Int] getCashPrior
    - [Int] doTransferIn #
    - [Int] doTransferOut #

 +  RegistryStorage 

 +  Registry (RegistryStorage, RegistryErrorReporter)
    - [Pub]  #
    - [Pub] initialize #
    - [Ext] setPTokenImplementation #
    - [Ext] _setFactoryContract #
    - [Pub] addPToken #
    - [Pub] addPETH #
    - [Pub] addPPIE #
							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  RegistryStorage 

 +  ControllerErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  TokenErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  OracleErrorReporter 
    - [Int] fail #

 +  FactoryErrorReporter 
    - [Int] fail #

 +  RegistryErrorReporter 
    - [Int] fail #

 + [Int] RegistryInterface 
    - [Ext] admin
    - [Ext] pTokenImplementation
    - [Ext] addPToken #
    - [Ext] addPETH #
    - [Ext] addPPIE #

 +  RegistryProxy (RegistryStorage, RegistryErrorReporter)
    - [Pub]  #
    - [Ext] setImplementation #
    - [Ext] _setPendingAdmin #
    - [Ext] _acceptAdmin #
    - [Int] delegateTo #
    - [Int] delegateAndReturn #
    - [Ext]  ($)
    - [Ext]  ($)							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 + [Lib] SafeMath 
    - [Int] add
    - [Int] add
    - [Int] sub
    - [Int] sub
    - [Int] mul
    - [Int] mul
    - [Int] div
    - [Int] div
    - [Int] mod
    - [Int] mod

 + [Int] ERC20Base 
    - [Ext] totalSupply
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] balanceOf

 +  ERC20 (ERC20Base)
    - [Ext] transfer #
    - [Ext] transferFrom #

 +  ERC20NS (ERC20Base)
    - [Ext] transfer #
    - [Ext] transferFrom #

 +  StandardToken (ERC20)
    - [Pub]  #
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Pub] allowance
    - [Pub] balanceOf
    - [Ext] totalSupply

 +  NonStandardToken (ERC20NS)
    - [Pub]  #
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Pub] allowance
    - [Pub] balanceOf
    - [Ext] totalSupply

 +  ERC20Harness (StandardToken)
    - [Pub]  #
       - modifiers: StandardToken
    - [Pub] harnessSetFailTransferFromAddress #
    - [Pub] harnessSetFailTransferToAddress #
    - [Pub] harnessSetBalance #
    - [Ext] transfer #
    - [Ext] transferFrom #

							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  ControllerInterface 
    - [Ext] enterMarkets #
    - [Ext] exitMarket #
    - [Ext] mintAllowed #
    - [Ext] mintVerify #
    - [Ext] redeemAllowed #
    - [Ext] redeemVerify #
    - [Ext] borrowAllowed #
    - [Ext] borrowVerify #
    - [Ext] repayBorrowAllowed #
    - [Ext] repayBorrowVerify #
    - [Ext] liquidateBorrowAllowed #
    - [Ext] liquidateBorrowVerify #
    - [Ext] seizeAllowed #
    - [Ext] seizeVerify #
    - [Ext] transferAllowed #
    - [Ext] transferVerify #
    - [Ext] liquidateCalculateSeizeTokens
    - [Ext] getOracle

 +  ProxyWithRegistryStorage 

 +  ProxyWithRegistryInterface (ProxyWithRegistryStorage)
    - [Int] _setRegistry #
    - [Int] _pTokenImplementation

 +  ProxyWithRegistry (ProxyWithRegistryInterface)
    - [Int] _pTokenImplementation
    - [Int] _setRegistry #

 +  ImplementationStorage 
    - [Int] _setImplementation #

 +  PTokenStorage (ProxyWithRegistryStorage)

 +  PTokenInterface (PTokenStorage)
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
    - [Ext] borrowBalanceCurrent #
    - [Pub] borrowBalanceStored
    - [Pub] exchangeRateCurrent #
    - [Pub] exchangeRateStored
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Ext] seize #
    - [Pub] _setController #
    - [Ext] _setReserveFactor #
    - [Ext] _reduceReserves #
    - [Pub] _setInterestRateModel #

 +  PErc20Storage 

 +  PErc20Interface (PErc20Storage)
    - [Ext] mint #
    - [Ext] redeem #
    - [Ext] redeemUnderlying #
    - [Ext] borrow #
    - [Ext] repayBorrow #
    - [Ext] repayBorrowBehalf #
    - [Ext] liquidateBorrow #
    - [Ext] _addReserves #

 +  PPIEStorage 

 +  PPIEInterface (PPIEStorage)
    - [Ext] delegate #
    - [Ext] delegateBySig #
    - [Ext] getCurrentVotes
    - [Ext] getPriorVotes

 + [Int] EIP20Interface 
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 + [Int] EIP20NonStandardInterface 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 +  CarefulMath 
    - [Int] mulUInt
    - [Int] divUInt
    - [Int] subUInt
    - [Int] addUInt
    - [Int] addThenSubUInt

 +  Exponential (CarefulMath)
    - [Int] getExp
    - [Int] addExp
    - [Int] subExp
    - [Int] mulScalar
    - [Int] mulScalarTruncate
    - [Int] mulScalarTruncateAddUInt
    - [Int] divScalar
    - [Int] divScalarByExp
    - [Int] divScalarByExpTruncate
    - [Int] mulExp
    - [Int] mulExp
    - [Int] mulExp3
    - [Int] divExp
    - [Int] truncate
    - [Int] lessThanExp
    - [Int] lessThanOrEqualExp
    - [Int] greaterThanExp
    - [Int] isZeroExp
    - [Int] safe224
    - [Int] safe32
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] fraction

 +  PriceOracle 
    - [Ext] getUnderlyingPrice
    - [Ext] updateUnderlyingPrice #

 +  ControllerErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  TokenErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  OracleErrorReporter 
    - [Int] fail #

 +  FactoryErrorReporter 
    - [Int] fail #

 +  RegistryErrorReporter 
    - [Int] fail #

 +  UnitrollerAdminStorage 

 +  ControllerStorage (UnitrollerAdminStorage)

 +  Unitroller (UnitrollerAdminStorage, ControllerErrorReporter)
    - [Pub]  #
    - [Pub] _setPendingImplementation #
    - [Pub] _acceptImplementation #
    - [Pub] _setPendingAdmin #
    - [Pub] _acceptAdmin #
    - [Ext]  ($)
    - [Ext]  ($)

 +  Pie 
    - [Pub]  #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Int] _transferTokens #
    - [Int] safe96
    - [Int] add96
    - [Int] sub96
    - [Int] getChainId

 +  PToken (PTokenInterface, Exponential, TokenErrorReporter)
    - [Pub] initialize #
    - [Int] transferTokens #
    - [Ext] transfer #
       - modifiers: nonReentrant
    - [Ext] transferFrom #
       - modifiers: nonReentrant
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Int] getBlockNumber
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
       - modifiers: nonReentrant
    - [Ext] borrowBalanceCurrent #
       - modifiers: nonReentrant
    - [Pub] borrowBalanceStored
    - [Int] borrowBalanceStoredInternal
    - [Pub] exchangeRateCurrent #
       - modifiers: nonReentrant
    - [Pub] exchangeRateStored
    - [Int] exchangeRateStoredInternal
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Int] mintInternal #
       - modifiers: nonReentrant
    - [Int] mintFresh #
    - [Int] redeemInternal #
       - modifiers: nonReentrant
    - [Int] redeemUnderlyingInternal #
       - modifiers: nonReentrant
    - [Int] redeemFresh #
    - [Int] borrowInternal #
       - modifiers: nonReentrant
    - [Int] borrowFresh #
    - [Int] repayBorrowInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowBehalfInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowFresh #
    - [Int] liquidateBorrowInternal #
       - modifiers: nonReentrant
    - [Int] liquidateBorrowFresh #
    - [Ext] seize #
       - modifiers: nonReentrant
    - [Int] seizeInternal #
    - [Pub] _setController #
    - [Int] _setControllerInternal #
    - [Ext] _setReserveFactor #
       - modifiers: nonReentrant
    - [Int] _setReserveFactorFresh #
    - [Int] _addReservesInternal #
       - modifiers: nonReentrant
    - [Int] _addReservesFresh #
    - [Ext] _reduceReserves #
       - modifiers: nonReentrant
    - [Int] _reduceReservesFresh #
    - [Pub] _setInterestRateModel #
    - [Int] _setInterestRateModelFresh #
    - [Int] _setInterestRateModelFreshInternal #
    - [Pub] getMyAdmin
    - [Int] getCashPrior
    - [Int] doTransferIn #
    - [Int] doTransferOut #

 +  InterestRateModel 
    - [Ext] getBorrowRate
    - [Ext] getSupplyRate

 + [Int] RegistryInterface 
    - [Ext] admin
    - [Ext] pTokenImplementation
    - [Ext] addPToken #
    - [Ext] addPETH #
    - [Ext] addPPIE #

 + [Lib] SafeMath 
    - [Int] add
    - [Int] add
    - [Int] sub
    - [Int] sub
    - [Int] mul
    - [Int] mul
    - [Int] div
    - [Int] div
    - [Int] mod
    - [Int] mod

 + [Int] AggregatorInterface 
    - [Ext] latestAnswer

 + [Lib] UQ112x112 
    - [Int] encode
    - [Int] uqdiv

 + [Lib] FixedPoint 
    - [Int] mul
    - [Int] decode144

 + [Int] IUniswapV2Pair 
    - [Ext] token0
    - [Ext] token1
    - [Ext] getReserves
    - [Ext] price0CumulativeLast
    - [Ext] price1CumulativeLast

 + [Int] IUniswapV2Factory 
    - [Ext] getPair

 +  UniswapPriceOracleStorage 

 + [Int] IRegistry 
    - [Ext] pETH

 +  UniswapPriceOracle (UniswapPriceOracleStorage, PriceOracle, OracleErrorReporter)
    - [Pub]  #
    - [Pub] initialize #
    - [Pub] update #
    - [Pub] getUniswapPair
    - [Pub] getUnderlyingPrice
    - [Pub] updateUnderlyingPrice #
    - [Pub] getPriceInUSD
    - [Pub] getCourseInETH
    - [Pub] isNewAssetForOracle
    - [Pub] isPeriodElapsed
    - [Int] encode
    - [Int] uqdiv
    - [Ext] _setNewAddresses #
							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  ControllerErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  TokenErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  OracleErrorReporter 
    - [Int] fail #

 +  FactoryErrorReporter 
    - [Int] fail #

 +  RegistryErrorReporter 
    - [Int] fail #

 +  UniswapPriceOracleStorage 

 +  UniswapPriceOracleProxy (UniswapPriceOracleStorage, OracleErrorReporter)
    - [Pub]  #
    - [Ext] setOracleImplementation #
    - [Ext] _setPendingAdmin #
    - [Ext] _acceptAdmin #
    - [Int] delegateTo #
    - [Prv] delegateAndReturn #
    - [Ext]  ($)
    - [Ext]  ($)
							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  ControllerInterface 
    - [Ext] enterMarkets #
    - [Ext] exitMarket #
    - [Ext] mintAllowed #
    - [Ext] mintVerify #
    - [Ext] redeemAllowed #
    - [Ext] redeemVerify #
    - [Ext] borrowAllowed #
    - [Ext] borrowVerify #
    - [Ext] repayBorrowAllowed #
    - [Ext] repayBorrowVerify #
    - [Ext] liquidateBorrowAllowed #
    - [Ext] liquidateBorrowVerify #
    - [Ext] seizeAllowed #
    - [Ext] seizeVerify #
    - [Ext] transferAllowed #
    - [Ext] transferVerify #
    - [Ext] liquidateCalculateSeizeTokens
    - [Ext] getOracle

 +  InterestRateModel 
    - [Ext] getBorrowRate
    - [Ext] getSupplyRate

 + [Int] RegistryInterface 
    - [Ext] admin
    - [Ext] pTokenImplementation
    - [Ext] addPToken #
    - [Ext] addPETH #
    - [Ext] addPPIE #

 +  ProxyWithRegistryStorage 

 +  ProxyWithRegistryInterface (ProxyWithRegistryStorage)
    - [Int] _setRegistry #
    - [Int] _pTokenImplementation

 +  ProxyWithRegistry (ProxyWithRegistryInterface)
    - [Int] _pTokenImplementation
    - [Int] _setRegistry #

 +  ImplementationStorage 
    - [Int] _setImplementation #

 +  PTokenStorage (ProxyWithRegistryStorage)

 +  PTokenInterface (PTokenStorage)
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
    - [Ext] borrowBalanceCurrent #
    - [Pub] borrowBalanceStored
    - [Pub] exchangeRateCurrent #
    - [Pub] exchangeRateStored
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Ext] seize #
    - [Pub] _setController #
    - [Ext] _setReserveFactor #
    - [Ext] _reduceReserves #
    - [Pub] _setInterestRateModel #

 +  PErc20Storage 

 +  PErc20Interface (PErc20Storage)
    - [Ext] mint #
    - [Ext] redeem #
    - [Ext] redeemUnderlying #
    - [Ext] borrow #
    - [Ext] repayBorrow #
    - [Ext] repayBorrowBehalf #
    - [Ext] liquidateBorrow #
    - [Ext] _addReserves #

 +  PPIEStorage 

 +  PPIEInterface (PPIEStorage)
    - [Ext] delegate #
    - [Ext] delegateBySig #
    - [Ext] getCurrentVotes
    - [Ext] getPriorVotes

 + [Int] EIP20Interface 
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 + [Int] EIP20NonStandardInterface 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] allowance

 +  CarefulMath 
    - [Int] mulUInt
    - [Int] divUInt
    - [Int] subUInt
    - [Int] addUInt
    - [Int] addThenSubUInt

 +  Exponential (CarefulMath)
    - [Int] getExp
    - [Int] addExp
    - [Int] subExp
    - [Int] mulScalar
    - [Int] mulScalarTruncate
    - [Int] mulScalarTruncateAddUInt
    - [Int] divScalar
    - [Int] divScalarByExp
    - [Int] divScalarByExpTruncate
    - [Int] mulExp
    - [Int] mulExp
    - [Int] mulExp3
    - [Int] divExp
    - [Int] truncate
    - [Int] lessThanExp
    - [Int] lessThanOrEqualExp
    - [Int] greaterThanExp
    - [Int] isZeroExp
    - [Int] safe224
    - [Int] safe32
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] add_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] sub_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] mul_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] div_
    - [Int] fraction

 +  PriceOracle 
    - [Ext] getUnderlyingPrice
    - [Ext] updateUnderlyingPrice #

 +  ControllerErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  TokenErrorReporter 
    - [Int] fail #
    - [Int] failOpaque #

 +  OracleErrorReporter 
    - [Int] fail #

 +  FactoryErrorReporter 
    - [Int] fail #

 +  RegistryErrorReporter 
    - [Int] fail #

 +  UnitrollerAdminStorage 

 +  ControllerStorage (UnitrollerAdminStorage)

 +  Unitroller (UnitrollerAdminStorage, ControllerErrorReporter)
    - [Pub]  #
    - [Pub] _setPendingImplementation #
    - [Pub] _acceptImplementation #
    - [Pub] _setPendingAdmin #
    - [Pub] _acceptAdmin #
    - [Ext]  ($)
    - [Ext]  ($)

 +  Pie 
    - [Pub]  #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Int] _transferTokens #
    - [Int] safe96
    - [Int] add96
    - [Int] sub96
    - [Int] getChainId

 +  PToken (PTokenInterface, Exponential, TokenErrorReporter)
    - [Pub] initialize #
    - [Int] transferTokens #
    - [Ext] transfer #
       - modifiers: nonReentrant
    - [Ext] transferFrom #
       - modifiers: nonReentrant
    - [Ext] approve #
    - [Ext] allowance
    - [Ext] balanceOf
    - [Ext] balanceOfUnderlying #
    - [Ext] getAccountSnapshot
    - [Int] getBlockNumber
    - [Ext] borrowRatePerBlock
    - [Ext] supplyRatePerBlock
    - [Ext] totalBorrowsCurrent #
       - modifiers: nonReentrant
    - [Ext] borrowBalanceCurrent #
       - modifiers: nonReentrant
    - [Pub] borrowBalanceStored
    - [Int] borrowBalanceStoredInternal
    - [Pub] exchangeRateCurrent #
       - modifiers: nonReentrant
    - [Pub] exchangeRateStored
    - [Int] exchangeRateStoredInternal
    - [Ext] getCash
    - [Pub] accrueInterest #
    - [Int] mintInternal #
       - modifiers: nonReentrant
    - [Int] mintFresh #
    - [Int] redeemInternal #
       - modifiers: nonReentrant
    - [Int] redeemUnderlyingInternal #
       - modifiers: nonReentrant
    - [Int] redeemFresh #
    - [Int] borrowInternal #
       - modifiers: nonReentrant
    - [Int] borrowFresh #
    - [Int] repayBorrowInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowBehalfInternal #
       - modifiers: nonReentrant
    - [Int] repayBorrowFresh #
    - [Int] liquidateBorrowInternal #
       - modifiers: nonReentrant
    - [Int] liquidateBorrowFresh #
    - [Ext] seize #
       - modifiers: nonReentrant
    - [Int] seizeInternal #
    - [Pub] _setController #
    - [Int] _setControllerInternal #
    - [Ext] _setReserveFactor #
       - modifiers: nonReentrant
    - [Int] _setReserveFactorFresh #
    - [Int] _addReservesInternal #
       - modifiers: nonReentrant
    - [Int] _addReservesFresh #
    - [Ext] _reduceReserves #
       - modifiers: nonReentrant
    - [Int] _reduceReservesFresh #
    - [Pub] _setInterestRateModel #
    - [Int] _setInterestRateModelFresh #
    - [Int] _setInterestRateModelFreshInternal #
    - [Pub] getMyAdmin
    - [Int] getCashPrior
    - [Int] doTransferIn #
    - [Int] doTransferOut #
							

Function Graph

Smart Contract Graph

Inheritence Chart

Smart Contract Inheritance

Functions Overview



 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  InterestRateModel 
    - [Ext] getBorrowRate
    - [Ext] getSupplyRate

 + [Lib] SafeMath 
    - [Int] add
    - [Int] add
    - [Int] sub
    - [Int] sub
    - [Int] mul
    - [Int] mul
    - [Int] div
    - [Int] div
    - [Int] mod
    - [Int] mod

 +  WhitePaperInterestRateModel (InterestRateModel)
    - [Pub]  #
    - [Pub] utilizationRate
    - [Pub] getBorrowRate
    - [Pub] getSupplyRate