Submitted by Trust
Pumps receive the chain BLOCKTIME in the constructor. In every update, it is used to calculate the blocksPassed variable, which determines what is the maximum change in price (done in `capReserve()`).
The issue is that BLOCKTIME is an immutable variable in the pump, which is immutable in the Well, meaning it is basically set in stone and can only be changed through a Well redeploy and liquidity migration (very long cycle).
However, BLOCKTIME actually changes every now and then, especially in L2s.For example, the recent Bedrock upgrade in Optimism completely changed the block time generation. It is very clear this will happen many times over the course of Basins lifetime.
When a wrong BLOCKTIME is used, the `capReserve()` function will either limit price changes too strictly, or too permissively. In the too strict case, this would cause larger and large deviations between the oracle pricing and the real market prices, leading to large arb opportunities. In the too permissive case, the function will not cap changes like it is meant to, making the oracle more manipulatable than the economic model used when deploying the pump.
Treating of BLOCK_TIME as permanent will cause serious economic flaws in the oracle when block times change.
The BLOCK_TIME should be changeable, given a long enough freeze period where LPs can withdraw their tokens if they are unsatisfied with the change.
publiuss (Basin) confirmed and commented:
