# @tracer-protocol/pool-state-helper

> Tracer's Perpetual Pools peripheral utility contract

Latest version **0.0.4** (published 2022-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tracer-protocol/pool-state-helper
pnpm add @tracer-protocol/pool-state-helper
yarn add @tracer-protocol/pool-state-helper
bun add @tracer-protocol/pool-state-helper
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2022-07-09 |
| First published | 2022-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 655.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dospore, ray_lionsmane, scaredibis |

## Links

- npm: https://www.npmjs.com/package/@tracer-protocol/pool-state-helper
- Repository: https://github.com/tracer-protocol/pool-state-helper
- Homepage: https://github.com/tracer-protocol/pool-state-helper#readme
- Issues: https://github.com/tracer-protocol/pool-state-helper/issues
- npm.io page: https://npm.io/package/@tracer-protocol/pool-state-helper

## Recent versions

- 0.0.4 (latest) — 2022-07-09
- 0.0.3 — 2022-07-08
- 0.0.2 — 2022-07-07
- 0.0.1 — 2022-07-07

## README

# 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`
<br>

###### 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;
    }
```

---
_Source: https://npm.io/package/@tracer-protocol/pool-state-helper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
