NTokenMoonBirds

Implementation of the interest bearing token for the ParaSpace protocol

constructor

constructor(contract IPool pool) public

Constructor.

Parameters

NameTypeDescription

pool

contract IPool

The address of the Pool contract

getXTokenType

function getXTokenType() external pure returns (enum XTokenType)

return token type`of xToken

burn

function burn(address from, address receiverOfUnderlying, uint256[] tokenIds) external virtual returns (uint64, uint64)

Burns nTokens from user and sends the equivalent amount of underlying to receiverOfUnderlying

In some instances, the mint event could be emitted from a burn transaction if the amount to burn is less than the interest that the user accrued

Parameters

NameTypeDescription

from

address

The address from which the nTokens will be burned

receiverOfUnderlying

address

The address that will receive the underlying

tokenIds

uint256[]

The ids of the tokens getting burned

Return Values

NameTypeDescription

[0]

uint64

old and new collateralized balance

[1]

uint64

onERC721Received

function onERC721Received(address operator, address from, uint256 id, bytes) external virtual returns (bytes4)

toggleNesting

function toggleNesting(uint256[] tokenIds) external

an additional function that is custom to MoonBirds reserve. This function allows NToken holders to toggle on/off the nesting the status for the underlying tokens

nestingPeriod

function nestingPeriod(uint256 tokenId) external view returns (bool nesting, uint256 current, uint256 total)

an additional function that is custom to MoonBirds reserve. This function allows NToken holders to get nesting the state for the underlying tokens

nestingOpen

function nestingOpen() external returns (bool)

an additional function that is custom to MoonBirds reserve. This function check if nesting is open for the underlying tokens