# MaverickV2BoostedPositionFactory

**Inherits:** [IMaverickV2BoostedPositionFactory](/technical-reference/maverick-v2/v2-contracts/maverick-v2-supplemental-contracts/interfaces/imaverickv2boostedpositionfactory.md)

Factory contract that deploys Maverick V2 Boosted Positions.

### State Variables <a href="#state-variables" id="state-variables"></a>

#### NAME\_PREFIX <a href="#name_prefix" id="name_prefix"></a>

```solidity
string private constant NAME_PREFIX = "Maverick BP-";
```

#### SYMBOL\_PREFIX <a href="#symbol_prefix" id="symbol_prefix"></a>

```solidity
string private constant SYMBOL_PREFIX = "MBP-";
```

#### \_allBoostedPositions <a href="#allboostedpositions" id="allboostedpositions"></a>

```solidity
IMaverickV2BoostedPosition[] private _allBoostedPositions;
```

#### \_boostedPositionsByPool <a href="#boostedpositionsbypool" id="boostedpositionsbypool"></a>

```solidity
mapping(IMaverickV2Pool => IMaverickV2BoostedPosition[]) private _boostedPositionsByPool;
```

#### poolFactory <a href="#poolfactory" id="poolfactory"></a>

Pool factory that all BPs pool must be deployed from.

```solidity
IMaverickV2Factory public immutable poolFactory;
```

#### isFactoryBoostedPosition <a href="#isfactoryboostedposition" id="isfactoryboostedposition"></a>

Returns whether or not input BP was created by this factory.

```solidity
mapping(IMaverickV2BoostedPosition => bool) public isFactoryBoostedPosition;
```

### Functions <a href="#functions" id="functions"></a>

#### constructor <a href="#constructor" id="constructor"></a>

Factory will only deploy BPs from the specified pool factory.

```solidity
constructor(IMaverickV2Factory _poolFactory);
```

#### \_createParameterValidation <a href="#createparametervalidation" id="createparametervalidation"></a>

```solidity
function _createParameterValidation(IMaverickV2Pool pool, uint32[] memory binIds, uint128[] memory ratios, uint8 kind)
    internal
    view;
```

#### createBoostedPosition <a href="#createboostedposition" id="createboostedposition"></a>

Creates BP from the specified input parameters. Requirements:

* Pool must be from pool factory
* BP kind must be supported by the pool
* BinIds have to be sorted in ascending order
* ratios\[0] must be 1e18; ratios are specified in D18 scale
* ratio and binId arrays have to be the same length
* movement-mode BPs can only have one binId
* static-mode BPs can have at most 24 binIds

```solidity
function createBoostedPosition(IMaverickV2Pool pool, uint32[] memory binIds, uint128[] memory ratios, uint8 kind)
    external
    returns (IMaverickV2BoostedPosition boostedPosition);
```

#### lookup <a href="#lookup" id="lookup"></a>

Look up BPs by range of indexes.

```solidity
function lookup(uint256 startIndex, uint256 endIndex)
    external
    view
    returns (IMaverickV2BoostedPosition[] memory returnBoostedPositions);
```

#### lookup <a href="#lookup-1" id="lookup-1"></a>

Look up BPs by range of indexes.

```solidity
function lookup(IMaverickV2Pool pool, uint256 startIndex, uint256 endIndex)
    external
    view
    returns (IMaverickV2BoostedPosition[] memory returnBoostedPositions);
```

#### \_packBinIds <a href="#packbinids" id="packbinids"></a>

```solidity
function _packBinIds(uint32[] memory binIds) private pure returns (bytes32[3] memory binIdsBytes);
```

#### \_packRatios <a href="#packratios" id="packratios"></a>

```solidity
function _packRatios(uint128[] memory ratios) internal pure returns (bytes32[12] memory ratiosBytes);
```

<br>


---

# 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.mav.xyz/technical-reference/maverick-v2/v2-contracts/maverick-v2-supplemental-contracts/maverickv2boostedpositionfactory.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.
