MidasPair721
MidasPair721
Contract used to trade through the Liquidity Book and also acts as the manager of liquidity positions.
constructor
Parameters
SellNFT
BuyNFT
ERC721PositionMinted
ERC20PositionMinted
PositionBurned
ClaimFee
FlashLoan
NewRoyaltyFee
initialize
Function to initialize the pair which is strict to MidasFactory.
getTokenX
Pure function to get the NFT address of this pair.
getTokenY
Pure function to get the FT address of this pair.
getLPToken
Pure function to get the LP Token address of this pair.
factory
View function to get the factory address of this pair.
getReserves
View function to get the NFT and FT reserves of this pair.
Return Values
getIDs
View function to get current index price info of this pair.
Return Values
getGlobalFees
View function to get the global fees information, the total fees and those for protocol
Return Values
feeParameters
View function to get the fee parameters of this pair.
Return Values
getBin
View function to get the reserves of bin at id
.
Parameters
Return Values
getLpInfos
View function to get the LP info via LP tokenId.
Parameters
Return Values
getPriceFromBin
View function to get the price mapping to the specific bin id.
Parameters
Return Values
getLPFromNFT
View function to get the LP tokenId of the specific NFT.
Parameters
Return Values
getBinParamFromLP
View function to get the quote price of the specific position.
Parameters
Return Values
getLpReserve
View function to get the reserves of the specific position.
Parameters
Return Values
sellNFT
Function to buy the NFT asset at the spot price.
Parameters
Return Values
buyNFT
Function to buy the NFT asset at the spot price.
Parameters
mintNFT
Performs a low level add liquidity of NFT. This needs to be called from a contract which performs important safety checks.
Parameters
Return Values
mintFT
Performs a low level add liquidity of FT. This needs to be called from a contract which performs important safety checks.
Parameters
Return Values
burn
Performs a low level remove liquidity. This needs to be called from a contract which performs important safety checks
Parameters
Return Values
collectProtocolFees
Collect the protocol fees and send them to the fee recipient.
Return Values
collectLPFees
Collect the LP fees and send them to the fee recipient.
Return Values
collectRoyaltyFees
Collect the royalty fees and send them to the royalty fee recipient.
Return Values
updateRoyalty
Update the royalty info of the NFT according to EIP2981.
Parameters
updateSafetyLock
Update the safety locker status which is strict to factory.
Parameters
flashLoan
Parameters
Last updated