> For the complete documentation index, see [llms.txt](https://docs.pylon.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pylon.money/contract-specification/launchpad/lockup.md).

# Lockup

### **`state.rs`** <a href="#state-rs" id="state-rs"></a>

Stores all relevant contract parameters.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]

pub struct Config {
    pub owner: CanonicalAddr,
    pub share_token: CanonicalAddr,
    pub reward_token: CanonicalAddr,
    pub start_time: u64,    
    pub cliff_time: u64,    
    pub finish_time: u64,    
    pub reward_rate: Decimal256,
}​
```

`owner`: the owner address of this contract.

`share_token`: address of the DP token contract used by this lockup pool.

`reward_token`: token contract address of the token emitted by this pool after a minimum lockup period has passed.

`start_time`: timestamp of which lockup logic will be valid from.

`cliff_time`: timestamp of which `reward_token` distribution logic will be valid from.

`finish_time`: timestamp of which lockup logic will expire

`reward_rate`: defines at which rate `reward_token` will be given out to `lockup` contract depositors

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]

pub struct Reward {
    pub total_deposit: Uint256,    
    pub last_update_time: u64,    
    pub reward_per_token_stored: Decimal256,
}​
```

`total_deposit`: total principal tokens deposited.

`last_update_time`: last reward tokens distribution timestamp.

`reward_per_token_stored`: number of reward tokens to be sent out per deposit token (DP tokens).

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]

pub struct User {
    pub amount: Uint256,    
    pub reward: Uint256,    
    pub reward_per_token_paid: Decimal256,
}​
```

`amount`: the number of DP tokens a user has deposited.

`reward`: the number of reward tokens distributed.

`reward_per_token_paid`: the number of reward tokens already paid per token.


---

# 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://docs.pylon.money/contract-specification/launchpad/lockup.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.
