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
  • mintTo (0x449a52f8)
  • redeemTo (0x2f7605fb)
  • redeemUnderlyingTo (0x0508b57d)
  • balanceOf (0x70a08231)
  1. interfaces

IBPrimaryLendingPlatform

Overview

License: MIT

interface IBPrimaryLendingPlatform

Functions info

mintTo (0x449a52f8)

function mintTo(
    address minter,
    uint256 mintAmount
) external returns (uint256 err, uint256 mintedAmount)

Sender supplies assets into the market and receives cTokens in exchange

Accrues interest whether or not the operation succeeds, unless reverted

Parameters:

Name
Type
Description

minter

address

the address of account which earn liquidity

mintAmount

uint256

The amount of the underlying asset to supply to minter

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

return uint256 minted amount

redeemTo (0x2f7605fb)

function redeemTo(
    address redeemer,
    uint256 redeemTokens
) external returns (uint256)

Sender redeems cTokens in exchange for the underlying asset

Accrues interest whether or not the operation succeeds, unless reverted

Parameters:

Name
Type
Description

redeemTokens

uint256

The number of cTokens to redeem into underlying

Return values:

Name
Type
Description

[0]

uint256

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

redeemUnderlyingTo (0x0508b57d)

function redeemUnderlyingTo(uint256 redeemAmount) external returns (uint256)

Sender redeems cTokens in exchange for a specified amount of underlying asset

Accrues interest whether or not the operation succeeds, unless reverted

Parameters:

Name
Type
Description

redeemAmount

uint256

The amount of underlying to redeem

Return values:

Name
Type
Description

[0]

uint256

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

balanceOf (0x70a08231)

function balanceOf(address owner) external view returns (uint256)

Get the token balance of the owner

Parameters:

Name
Type
Description

owner

address

The address of the account to query

Return values:

Name
Type
Description

[0]

uint256

The number of tokens owned by owner

PreviousIBLendingTokenNextIComptroller

Last updated 7 months ago