RToken.
The tokenized supply position for a single market within an isolated pool. Wraps an underlying asset, accrues interest per block, and integrates with its parent pool's Comptroller.
The isolated-pool RToken is deployed per pool. Each RToken accrues interest independently and interacts exclusively with its parent pool's Comptroller for risk management. Users receive RTokens upon supplying assets and redeem them to withdraw principal plus accrued interest.
mint
Supplies underlying tokens to the market and mints RTokens to the caller.
function mint(uint256 mintAmount) external returns (uint256);
redeem / redeemUnderlying
Redeems RTokens for the underlying asset. redeem specifies the number of RTokens to burn; redeemUnderlying specifies the amount of underlying to receive.
function redeem(uint256 redeemTokens) external returns (uint256);
function redeemUnderlying(uint256 redeemAmount) external returns (uint256);
borrow
Borrows underlying tokens from the market against the caller's collateral.
function borrow(uint256 borrowAmount) external returns (uint256);
repayBorrow
Repays an outstanding borrow on behalf of the caller or another account.
function repayBorrow(uint256 repayAmount) external returns (uint256);
function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256);
liquidateBorrow
Liquidates an under-collateralized borrower's position, seizing their collateral.
function liquidateBorrow(
address borrower,
uint256 repayAmount,
IRToken rTokenCollateral
) external returns (uint256);
exchangeRateCurrent
Returns the current exchange rate between RTokens and the underlying asset.
function exchangeRateCurrent() external returns (uint256);