Skip to content
This repository was archived by the owner on Oct 3, 2026. It is now read-only.

Feat/bring back tau - #121

Merged
kinrezC merged 17 commits into
feat/v0.3.0from
feat/bring-back-tau
Apr 10, 2024
Merged

kinrezC merged 17 commits into
feat/v0.3.0from
feat/bring-back-tau

Conversation

@kinrezC

@kinrezC kinrezC commented Apr 5, 2024 •

Copy link
Copy Markdown
Contributor

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.

@kinrezC kinrezC added the 🚧 DO NOT MERGE 🚧 Do not merge label Apr 5, 2024
@kinrezC
kinrezC changed the base branch from main to feat/v0.3.0 April 10, 2024 18:15
@kinrezC
kinrezC marked this pull request as ready for review April 10, 2024 18:16
@kinrezC
kinrezC force-pushed the feat/bring-back-tau branch from 6f7d6fa to 93c049d Compare April 10, 2024 18:26
@kinrezC
kinrezC merged commit 6874aca into feat/v0.3.0 Apr 10, 2024
@kinrezC
kinrezC deleted the feat/bring-back-tau branch April 10, 2024 18:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant