CrossLending

Write Methods

crossBorrowERC20

function crossBorrowERC20( uint32 poolId, address asset, uint8[] calldata groups, uint256[] calldata amounts, address onBehalf, address receiver )

Borrow an amount of underlying asset from the pool with cross margin mode.

Parameter Name
Type
Description

poolId

uint32

The id of the pool

asset

address

The address of the underlying asset to deposit

groups

uint8[]

The interest rate class group of underlying asset

amounts

uint256[]

The underlying amount to be deposited, expressed in underlying asset decimals units

onBehalfOf

address

address whom will record the balance. Use msg.sender when the balance should be record to the caller.

receiver

address

address whom will receive the balance. Use msg.sender when the balance should be sent to the caller.

crossRepayERC20

function crossRepayERC20(
    uint32 poolId,
    address asset,
    uint8[] calldata groups,
    uint256[] calldata amounts,
    address onBehalf
  ) public

Repay an amount of underlying asset into the pool with cross margin mode.

Parameter Name
Type
Description

poolId

uint32

The id of the pool

asset

address

The address of the underlying asset to deposit

groups

uint8[]

The interest rate class group of underlying asset

amounts

uint256[]

The underlying amount to be deposited, expressed in underlying asset decimals units

onBehalfOf

address

address whom will record the balance. Use msg.sender when the balance should be record to the caller.

Last updated