[Audit_RV] add_liquidity does not fully follow the math model when computing the imbalance
calculate_delta_imbalance uses asset_state.reserve and asset_state.hub_reserve for its computation: https://github.com/galacticcouncil/HydraDX-math/blob/f4dab244bb5d57971325f0ba6fbb8f6c1353beeb/src/omnipool/math.rs#L419-L421
add_liquidity calls recalculate_imbalance which calls calculate_delta_imbalance with new_asset_state as an argument. This means that calculate_delta_imbalance receives the updated values for asset_state.reserve and asset_state.hub_reserve (i.e., using the math notations, it receives and uses uses Qi+ and Ri+). https://github.com/galacticcouncil/HydraDX-node/blob/8de6222f967cc1bfe120207a775e8f0dc8eb92a5/pallets/omnipool/src/lib.rs#L698
However, in the math model, the imbalance delta uses the non-updated reserves (Qi and Ri). https://github.com/galacticcouncil/HydraDX-simulations/blob/main/hydradx/spec/AddLiquidity.ipynb
Since Qi/Ri should be equal to Qi+/Ri+ (except for rounding errors), this may be fine. However, in today's meeting it seemed that you wanted to take another look, so I filed this issue.
this might no longer relevant and/or might be actually resolved. Imbalance calculation was completely refactored as part of other PR(s) and it not longer recalculated as mentioned in PR.