The function _mintAll() effectively picks up all of the inactive margin in a contract (margin not deployed) and calculates the notional amount to mint from this. The notional amount to mint is the product of the amount of inactive margin and leverage. Then the underlying tokens need to be approved so they are transferable from the LP Optimiser contract to the Periphery.sol contract. The Periphery.sol contract does the minting or burning. The
mintOrBurn function of the periphery needs the upper and lower ticks, notional to mint, and margin delta to support the notional.