Skip to main content

IBasePositionManager Interface

The IBasePositionManager interface defines the functions available in the BasePositionManager contract, which provides core position management functionality for the Satoshi Perps protocol.

Position Management

Increases a position with the specified parameters.
Decreases a position with the specified parameters.

Global Size Limits

Sets the maximum global long and short sizes for a list of tokens.
Returns the maximum global long size for a token.
Returns the maximum global short size for a token.

Fee Configuration

Sets the deposit fee basis points.
Returns the current deposit fee basis points.

Token Management

Transfers tokens from the sender to the contract.
Transfers tokens from the contract to a receiver.
Executes a token swap through the Router.

Fee Collection

Returns the amount of fees collected for a token.
Collects accumulated fees for a token and sends them to the specified receiver.

Contract References

Returns the address of the Vault contract.
Returns the address of the Router contract.
Returns the address of the ShortsTracker contract.
Returns the address of the WETH token.

ETH Handling

Receives ETH sent to the contract.

Usage Notes

  • The BasePositionManager is an abstract contract designed to be inherited by concrete implementations like PositionManager.
  • It provides core functionality for position management but lacks user-facing methods.
  • The contract implements safety checks such as global position size limits.
  • Fee collection is handled automatically when positions are adjusted.

Security Considerations

  • Functions are protected by various access controls in implementing contracts
  • Global size limits help prevent excessive risk concentration in specific tokens
  • Deposit fees may be charged to prevent abuse of zero-fee swaps