# Operator Staking Pool

The `OperatorStakingPool` tracks node operator LST balances for the purpose of differentiating from community LST balances. Node operators are required to stake their LSTs into this contract.

## View Functions

### lst

Returns the address of the liquid staking token supported by this pool

```solidity
function lst() external view returns (address)
```

#### Return Values

| Name | Type    | Description    |
| ---- | ------- | -------------- |
| lst  | address | address of LST |

### depositLimit

Returns the max amount of deposits per operator

```solidity
function depositLimit() external view returns (uint256)
```

#### Return Values

| Name         | Type    | Description                         |
| ------------ | ------- | ----------------------------------- |
| depositLimit | uint256 | max amount of deposits per operator |

### getOperators

Returns a list of all operators

```solidity
function getOperators() external view returns (address[])
```

#### Return Values

| Name      | Type       | Description       |
| --------- | ---------- | ----------------- |
| operators | address\[] | list of operators |

### getOperatorPrincipal

Returns an operator's principal staked balance

```solidity
function getOperatorPrincipal(address _operator) public view returns (uint256)
```

#### Parameters

| Name       | Type    | Description         |
| ---------- | ------- | ------------------- |
| \_operator | address | address of operator |

#### Return Values

| Name              | Type    | Description                      |
| ----------------- | ------- | -------------------------------- |
| operatorPrincipal | uint256 | operator principal staked amount |

### getOperatorStaked

Returns an operator's total staked balance

```solidity
function getOperatorStaked(address _operator) public view returns (uint256)
```

#### Parameters

| Name       | Type    | Description         |
| ---------- | ------- | ------------------- |
| \_operator | address | address of operator |

#### Return Values

| Name           | Type    | Description            |
| -------------- | ------- | ---------------------- |
| operatorStaked | uint256 | operator staked amount |

### getTotalPrincipal

Returns the total principal staked amount

```solidity
function getTotalPrincipal() external view returns (uint256)
```

#### Return Values

| Name           | Type    | Description                   |
| -------------- | ------- | ----------------------------- |
| totalPrincipal | uint256 | total principal staked amount |

### getTotalStaked

Returns the total staked amount

```solidity
function getTotalStaked() external view returns (uint256)
```

#### Return Values

| Name        | Type    | Description         |
| ----------- | ------- | ------------------- |
| totalStaked | uint256 | total staked amount |

### isOperator

Returns whether an account is an operator

```solidity
function isOperator(address _account) public view returns (bool)
```

#### Return Values

| Name       | Type | Description                                  |
| ---------- | ---- | -------------------------------------------- |
| isOperator | bool | true if account is operator, false otherwise |

## Write Functions

### onTokenTransfer

ERC677 implementation to receive deposits

```solidity
function onTokenTransfer(address _sender, uint256 _value, bytes) external
```

#### Parameters

| Name     | Type    | Description                 |
| -------- | ------- | --------------------------- |
| \_sender | address | address of sender           |
| \_value  | uint256 | amount of tokens to deposit |
|          | bytes   |                             |

### withdraw

Withdraws tokens

```solidity
function withdraw(uint256 _amount) external
```

#### Parameters

| Name     | Type    | Description        |
| -------- | ------- | ------------------ |
| \_amount | uint256 | amount to withdraw |

### addOperators

Adds new operators

```solidity
function addOperators(address[] _operators) external
```

#### Parameters

| Name        | Type       | Description              |
| ----------- | ---------- | ------------------------ |
| \_operators | address\[] | list of operators to add |

### removeOperators

Removes existing operators

```solidity
function removeOperators(address[] _operators) external
```

#### Parameters

| Name        | Type       | Description                 |
| ----------- | ---------- | --------------------------- |
| \_operators | address\[] | list of operators to remove |

### setDepositLimit

Sets the max amount of deposits per operator

```solidity
function setDepositLimit(uint256 _depositLimit) external
```

#### Parameters

| Name           | Type    | Description                         |
| -------------- | ------- | ----------------------------------- |
| \_depositLimit | uint256 | max amount of deposits per operator |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stake.link/link-staking-contracts/operatorstakingpool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
