Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/superfluid-finance/graphinator
superfluid graphinator - Lightweight Sentinel
https://github.com/superfluid-finance/graphinator
bun superfluid
Last synced: about 2 months ago
JSON representation
superfluid graphinator - Lightweight Sentinel
- Host: GitHub
- URL: https://github.com/superfluid-finance/graphinator
- Owner: superfluid-finance
- Created: 2024-05-22T14:12:01.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-09-17T10:20:31.000Z (3 months ago)
- Last Synced: 2024-09-17T17:13:54.964Z (3 months ago)
- Topics: bun, superfluid
- Language: TypeScript
- Homepage:
- Size: 387 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
The **graphinator** is a lightweight alternative to the [superfluid-sentinel](https://github.com/superfluid-finance/superfluid-sentinel).
It looks for [critical or insolvent accounts](https://docs.superfluid.finance/docs/protocol/advanced-topics/solvency/liquidations-and-toga) and liquidates their outgoing flows (CFA and GDA).
Unlike the sentinel, it is stateless and relies on the [Superfluid Subgraph](https://console.superfluid.finance/subgraph) as data source.By default, the graphinator operates in a _one-shot_ mode, meaning: it checks and liquidates once, then exits.
For continued operation, it's recommended to set up a cronjob.Once graphinator instance operates for a to-be-specified chain.
By default, it operates on all [listed Super Token](https://console.superfluid.finance/supertokens), but also allows to operate only on a single Super Token.## Prerequisites
Install Bun:
```bash
curl -fsSL https://bun.sh/install | bash
```Set up the repo and install dependencies:
```bash
git clone https://github.com/superfluid-finance/graphinator
cd graphinator
bun install
```## Run
```
PRIVATE_KEY=... ./grt.ts -n
```_network_ needs to be the canonical name of a chain where Superfluid is deployed. See [metadata/networks.json](https://github.com/superfluid-finance/protocol-monorepo/blob/dev/packages/metadata/networks.json) (field _name_). For example `base-mainnet`.
You can also provide `PRIVATE_KEY` via an `.env` file.
Make sure `grt.ts` is executable.
See `./grt.ts --help` for more config options.
## License
[MIT](https://choosealicense.com/licenses/mit/)