# Baseline Protocol Simulations Analysis There are three different Univ3 positions - floor, anchor and discovery. Each has a different liquidty profile. The floor is arguably the most important to focus on because it has the most distinct liquidity profile. Anchor and Discovery are less thick/more volatile. ### Initial Questions: * Is `LiquidityManager.sol` the only contract allowed to add/remove liquidity from the LPs? This makes it 100% POL right? * `liquidityRatioGrowth` seems sketchy with 1% price and 1% liquidity siphon ratio. Why is it based on increase in price as opposed to increase in $BOOST reserves in pool or liquidity? For example a 1% increase in liquidity instead of 1% increase in price (assuming it's sqrtx96 price). You should still get same results switching from price to liquidity/amounts and it should be simpler. Note that `_calculateTotalTokensAbsorbed` looks at number of tokens/liquidity already. * **0% fee test** - set fee to 0%. Then buy all the way to the top of discovery position, and then sell all the way down. You should be able to fully recover the initial starting state exactly. ### Remarks: * It seems that the rebalancing mechanics between the Univ3 positions is very convoluted from a mathematical point of view. It seems like the thinking around the `liquidityRatioGrowth` formula is incomplete. This is the most important formula because it basically gaurantees the entire value proposition that there always exists a floor (realistically it should be the floor + swap fees). This is why I suggest the above mentioned test. The test basically asserts that the below formulas are true: $$floor_{liquidity} >= anchor_{liquidity} + discover_{liquidity}$$ or $$floor_{reserves} >= anchor_{reserves} + discover_{reserves}$$ where it's a strict equality when fees are 0% and a strict inequality when fees are nonzero. A result of the above is that whenever positions are rebalaned, fees should only go to the floor position. However it looks like fees are being withdrawn and then rebalanced between **all** of the positions. * We should expect to see higher fees from floor -> anchor -> discovery in line with higher volatility. The liquidity is thinner, so taking a fee based on the liquidity will still give increasingly higher fees. * Liquidity is really a two sided term. Suppose there are the following amounts in the positions: * floor = 10 BOOST, 10 ETH * anchor = 10 BOOST, 12 ETH * Discovery = 10 BOOST, 100 ETH Note that liquidity is still increasing, but only on the ETH side. Also BOOST/ETH price increases as well, but BOOST liquidity stays the same. Assuming the above equations hold, we should expect to see something like this after a lot of volume/fees collected. Suppose there was 100 ETH worth of volume in the above mentioned test and we return back to the initial state, with a 1% fee. We would see something more like this: * floor = 10 BOOST, 11 ETH * anchor = 10 BOOST, 11.9 ETH (.1 ETH in fees collected, goes to floor) * Discovery = 10 BOOST, 99.1 ETH (.9 ETH in fees collected, goes to floor) * ticks are set in the pool and hard coded to 1.001%, when you are rebalancing, you arent changing the width you are changing the height. * BOOST is dynamically minted/burned. Everytime you shift you mint, everytime you slide you burn. * volatility circuit breakers exist (cant go past discovery anchor) * the size of the shift matters. The shift is triggered by a min value of 6%, but it could be...very large * keeper is the one that does the shift/slide, is there incentive to keep the keeper incentivized (similar like a liquidation?)