openPositionfunction is used to open a new farming position. This function requires, as input, the
positionIDthat represents the position is generated:
address. This means that each address can correspond to one and only one position within each setup; a single address cannot have multiple positions in a setup.
address. In this case, the
uniqueOwneris not the
msg.sender, but rather the
addresspassed in the
_addLiquidityfunction, which calculates the amount of inserted liquidity (
_addLiquidityfunction mints the NFT, using the parameters previously passed by the host at the moment of setup creation. See here for more details.
_addLiquiditycan then call the
FarmingPositionstruct for the created position is populated as follow: