0.0.1 • Published 1 year ago

alperp-2 v0.0.1

Weekly downloads
-
License
MIT*
Repository
-
Last release
1 year ago

Closing/Decreasing large size position detection bot

Description

This bot detects the closing of a position or decrease in an existing position in Perp Trade when the sizeDelta is considered large.

The threshold largeLimit of what is considered large for each network can be adjusted in NetworkData in src/network.ts.

Supported Chains

  • Polygon

Alerts

  • ALPERP-2-1

    • Fired when a DecreasePosition and ClosePosition event with the same key and sizeDelta is emitted with sizeDelta that exceed the threshold LARGE_LIMIT.
    • Severity is always set to "Info".
    • Type is always set to "Info".
    • Metadata contains:
      • Perp Trade: The address of Perp Trade contract.
      • Account: The address of the position owner.
      • Position size: The size of the closed position.
      • Position key: The key of the closed position.
  • ALPERP-2-2

    • Fired when only a DecreasePosition event is emitted with sizeDelta that exceed the threshold LARGE_LIMIT.
    • Severity is always set to "Info".
    • Type is always set to "Info".
    • Metadata contains:
      • Perp Trade: The address of Perp Trade contract.
      • Account: The address of the position owner.
      • Position decrease: The decrease in size of the position.
      • Position key: The key of the position.

Test Data

The bot behaviour can be verified with the following transaction:

0.0.1

1 year ago