V2 Fringe Finance Smart Contract Documentation
  • bToken
    • BErc20
    • BErc20Interface
    • BErc20Storage
    • BLendingToken
    • BToken
    • BTokenInterface
    • BTokenStorage
  • bondtroller
    • Bondtroller
    • BondtrollerV1Storage
    • BondtrollerV2Storage
    • BondtrollerV3Storage
    • BondtrollerV4Storage
    • BondtrollerV5Storage
  • interestRateModel
    • BaseJumpRateModelV2
    • InterestRateModel
    • JumpRateModelV3
  • interfaces
    • EIP20Interface
    • EIP20NonStandardInterface
    • IBErc20Token
    • IBLendingToken
    • IBPrimaryLendingPlatform
    • IComptroller
    • IPRJ
    • IPriceOracle
    • IPriceProviderAggregator
    • IPrimaryLendingPlatform
    • IPrimaryLendingPlatformLeverage
    • IPrimaryLendingPlatformLiquidation
    • ISimplePriceOracle
    • IUSDCTest
    • IWETH
    • IWstETH
  • mock
    • MockToken
    • MockWstETH
    • PRJ
    • WETH9
  • priceOracle
    • PriceOracle
    • PriceProviderAggregator
    • PriceProviderAggregatorPyth
    • priceproviders
      • ChainlinkPriceProvider
      • ChainlinkPriceProviderL2
      • ERC4626PriceProvider
      • LPPriceProvider
      • MutePriceProvider
      • PriceProvider
      • PythPriceProvider
      • UniswapV2PriceProvider
      • UniswapV2PriceProviderMock
      • UniswapV3PriceProvider
      • wstETHPriceProvider
      • wstETHPriceProviderL2
      • chainlink
        • AggregatorV3Interface
      • mute
        • IMuteSwitchPairDynamic
      • pyth
        • IPyth
        • PythStructs
      • uniswapV2
        • IUniswapV2Factory
        • IUniswapV2Pair
        • IUniswapV2Router02
        • SafeMath
        • UniswapV2Library
      • uniswapV3
        • v3-core
          • interfaces
            • IERC20Minimal
            • IUniswapV3Factory
            • IUniswapV3Pool
            • IUniswapV3PoolDeployer
            • pool
              • IUniswapV3PoolActions
              • IUniswapV3PoolDerivedState
              • IUniswapV3PoolEvents
              • IUniswapV3PoolImmutables
              • IUniswapV3PoolOwnerActions
              • IUniswapV3PoolState
          • libraries
            • TickMath
        • v3-periphery
          • libraries
            • OracleLibrary
  • primaryLendingPlatform
    • PrimaryLendingPlatformAtomicRepaymentCore
    • PrimaryLendingPlatformLeverageCore
    • PrimaryLendingPlatformLiquidationCore
    • PrimaryLendingPlatformModerator
    • PrimaryLendingPlatformProxyAdmin
    • PrimaryLendingPlatformV2Core
    • PrimaryLendingPlatformWrappedTokenGatewayCore
    • zksync
      • PrimaryLendingPlatformAtomicRepaymentZksync
      • PrimaryLendingPlatformLeverageZksync
      • PrimaryLendingPlatformLiquidationZksync
      • PrimaryLendingPlatformV2Zksync
      • PrimaryLendingPlatformWrappedTokenGatewayZksync
  • util
    • Asset
    • BondtrollerErrorReporter
    • CarefulMath
    • Errors
    • Exponential
    • ExponentialNoError
    • HomoraMath
    • TokenErrorReporter
  • paraswap
    • interfaces
      • IParaSwapAugustus
      • IParaSwapAugustusRegistry
Powered by GitBook
On this page
  • Overview
  • Functions info
  • initialize (0x1a31d465)
  • sweepToken (0x1be19560)
  • _addReserves (0x3e941010)
  1. bToken

BErc20

Overview

License: MIT

abstract contract BErc20 is BToken, BErc20Interface

Author: Compound CTokens which wrap an EIP-20 underlying

Functions info

initialize (0x1a31d465)

function initialize(
    address underlying_,
    Bondtroller comptroller_,
    InterestRateModel interestRateModel_,
    uint256 initialExchangeRateMantissa_,
    string memory name_,
    string memory symbol_,
    uint8 decimals_
) public

Initializes the new money market.

Parameters:

Name
Type
Description

underlying_

address

The address of the underlying asset.

comptroller_

contract Bondtroller

The address of the Comptroller.

interestRateModel_

contract InterestRateModel

The address of the interest rate model.

initialExchangeRateMantissa_

uint256

The initial exchange rate, scaled by 1e18.

name_

string

ERC-20 name of this token.

symbol_

string

ERC-20 symbol of this token.

decimals_

uint8

ERC-20 decimal precision of this token.

sweepToken (0x1be19560)

function sweepToken(EIP20NonStandardInterface token) external override

A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to admin (timelock).

Parameters:

Name
Type
Description

token

contract EIP20NonStandardInterface

The address of the ERC-20 token to sweep.

_addReserves (0x3e941010)

function _addReserves(uint256 addAmount) external override returns (uint256)

The sender adds to reserves.

Parameters:

Name
Type
Description

addAmount

uint256

The amount fo underlying token to add as reserves.

Return values:

Name
Type
Description

[0]

uint256

uint256 0=success, otherwise a failure (see ErrorReporter.sol for details).

PreviousbTokenNextBErc20Interface

Last updated 7 months ago