🏛
NFT AMM Pillars
The SeaCows protocol is supported by two main pillars that support the functionality of the NFT AMM.
- 1.Pool Factory: The core token pairing mechanism enabling liquidity providers to create liquidity pools.
- 2.Router: The core pricing mechanism to provide price transparency throughout the entire transaction.
A new NFT to ETH pair is created using the
SeacowsPairFactory
. With that the liquidity pool is initialised. The following parameters have to be provided: IERC721 _nft,
ICurve _bondingCurve,
address payable _assetRecipient,
SeacowsPair.PoolType _poolType,
uint128 _delta,
uint96 _fee,
uint128 _spotPrice,
uint256[] calldata _initialNFTIDs
A new NFT to ERC20 token pair is created using the
SeacowsPairFactory
. The following parameters have to be provided: struct CreateERC20PairParams {
ERC20 token;
IERC721 nft;
ICurve bondingCurve;
address payable assetRecipient;
SeacowsPair.PoolType poolType;
uint128 delta;
uint96 fee;
uint128 spotPrice;
uint256[] initialNFTIDs;
uint256 initialTokenBalance;
}
Whenever a swap is made with the liquidity pool the protocol calls the
SeacowsRouter
to provide an accurate price.To execute a trade the
nftIds
and details
have to be provided.Last modified 1mo ago