Initialized Price is slightly different from price argument in create pool
Alexangelj opened this issue · comments
Description
The createPool
function accepts a price
to initialize the pool at. For RMM-01, the function to compute the expected reserves from the price is a mathematical approximation that does not have full 18 decimal places of precision. This leads to a slight differential in the price input by a user and the actual price of the pool.
The price
argument is a generalized argument that is easier for external systems that integrate the protocol. Without the price, this computation would have to be handled by the external system, which can lead to mistakes and additional complexity. From Primitive's point of view, the benefits from keeping the price as the argument outweigh the slight mismatch in execution.
Closing since we are keeping this in. We should add this issue to documentation.