NTokenMoonBirds

Implementation of the interest bearing token for the ParaSpace protocol

constructor

constructor(contract IPool pool) public

Constructor.

Parameters

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

Return Values

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