@tracer-protocol/pool-state-helper
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Pool State Helper

⚠️ WIP ⚠️ USE AT YOUR OWN RISK ⚠️

Helpers to get pool state.

Assumptions & Constraints:

  • An upkeep will happen every UpdateInterval
  • Does not simulate keeper fees that get paid out of the pool
  • Does not simulate dynamic minting fees

Usage:

fullCommitPeriod(address leveragedPool)

leveragedPool - Leveraged Pool Address

Returns number of periods that will be executed during the FrontRunningInterval

getExpectedState(address leveragedPool, uint256 periods)

leveragedPool - Leveraged Pool Address periods - Number of commit periods to simulate

Returns the ExpectedPoolState after the TotalCommitments for periods are applied

    struct ExpectedPoolState {
        uint256 cumulativePendingMintSettlement;
        uint256 longSupply;
        uint256 longBalance;
        uint256 shortSupply;
        uint256 shortBalance;
        uint256 oraclePrice;
    }

Readme

Keywords

none

Package Sidebar

Install

npm i @tracer-protocol/pool-state-helper

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

672 kB

Total Files

69

Last publish

Collaborators

  • dospore
  • ray_lionsmane
  • scaredibis