Adds CoveredCall strategy which is effectively a LogNormal strategy with tau reintroduced
Some considerations:
I added a single change to the pool struct, which is to add the uint256 lastSwapTimestamp. This value is uniquely updated in swap and init, but nowhere else. It is rewritten to the current block.timestamp every time a swap succeeds.
The solver includes a unique getPoolParamsCustomTimestamp in order for users to be able to solve for swaps/price given that the lastSwapTimestamp value is virtual but does impact the effective price and/or swap outputs in the future.
The computePriceGiven*L functions return a value up to 1e-9 precision. This is relevant because this value is used to compute deltaLiquidity inside of the swap function. The outcome is effectively that users will pay slightly more or less fees given a swap. This can always be accounted for by setting a slightly lower or higher swapFee for a given CoveredCall pool.
Adds
CoveredCall
strategy which is effectively aLogNormal
strategy withtau
reintroducedSome considerations:
uint256 lastSwapTimestamp
. This value is uniquely updated inswap
andinit
, but nowhere else. It is rewritten to the currentblock.timestamp
every time a swap succeeds.getPoolParamsCustomTimestamp
in order for users to be able to solve for swaps/price given that thelastSwapTimestamp
value is virtual but does impact the effective price and/or swap outputs in the future.computePriceGiven*L
functions return a value up to 1e-9 precision. This is relevant because this value is used to computedeltaLiquidity
inside of the swap function. The outcome is effectively that users will pay slightly more or less fees given a swap. This can always be accounted for by setting a slightly lower or higherswapFee
for a given CoveredCall pool.