> For the complete documentation index, see [llms.txt](https://clanker.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clanker.gitbook.io/documentation/references/core-contracts/v3.1/lplockerv2.md).

# LpLockerv2

The LpLockerv2 contract manages trading fees from the Clanker contract, with a 20/80 split between Clanker and token's interface / creator. Only the Clanker contract can deposit new liquidity position NFTs. The `tokenId` parameter is the token's associated liquidity position NFT ID (emitted and returned from `deployToken()`).

### User Functions

`updateCreatorRewardAdmin()`: Allows creator NFT admin to change the admin for their token

```solidity
// note: will revert if not called by the token's admin
function updateCreatorRewardAdmin(
    uint256 tokenId,  // Token ID to update
    address newAdmin  // New administrator address
) public {...}
```

A similar function exists for the interface's reward recipient, `updateInterfaceRewardAdmin()`.

`updateCreatorRewardRecipient()`: Allows creator NFT admin to update the reward recipient for their token

```solidity
// note: will revert if not called by the token's admin
function updateCreatorRewardRecipient(
    uint256 tokenId,      // Token ID to update
    address newRecipient  // New reward recipient
) public {...}
```

A similar function exists for the interface's reward recipient, `updateInterfaceRewardRecipient()`.

`claimRewards()`: Allows any address to claim accumulated trading fees

```
// note: callable by anyone
function claimRewards(
    uint256 tokenId  // Token ID for claiming rewards
) public {...}
```

Claimed rewards are distributed with 20% going to Clanker and 80% split between the creator and the interface. If the reward recipient is set to the zero address for non-Clanker rewards, the Clanker receives all fees.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://clanker.gitbook.io/documentation/references/core-contracts/v3.1/lplockerv2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
