# Constants

[Git Source](https://github.com/traderjoe-xyz/joe-v2/blob/16f011d25e6bf6d0a0c479974345b623d491104f/src/libraries/Constants.sol)

**Author:**\
Trader Joe

Set of constants for Liquidity Book contracts

## State Variables

### SCALE\_OFFSET

```solidity
uint8 internal constant SCALE_OFFSET = 128;
```

### SCALE

```solidity
uint256 internal constant SCALE = 1 << SCALE_OFFSET;
```

### PRECISION

```solidity
uint256 internal constant PRECISION = 1e18;
```

### SQUARED\_PRECISION

```solidity
uint256 internal constant SQUARED_PRECISION = PRECISION * PRECISION;
```

### MAX\_FEE

```solidity
uint256 internal constant MAX_FEE = 0.1e18;
```

### MAX\_PROTOCOL\_SHARE

```solidity
uint256 internal constant MAX_PROTOCOL_SHARE = 2_500;
```

### BASIS\_POINT\_MAX

```solidity
uint256 internal constant BASIS_POINT_MAX = 10_000;
```

### MAX\_LIQUIDITY\_PER\_BIN

```solidity
uint256 internal constant MAX_LIQUIDITY_PER_BIN =
    65251743116719673010965625540244653191619923014385985379600384103134737;
```

### CALLBACK\_SUCCESS

*The expected return after a successful flash loan*

```solidity
bytes32 internal constant CALLBACK_SUCCESS = keccak256("LBPair.onFlashLoan");
```


---

# 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://developers.lfj.gg/contracts/libraries/constants.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.
