> For the complete documentation index, see [llms.txt](https://adrena.gitbook.io/adrena/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adrena.gitbook.io/adrena/technical-documentation/sablier-automation-threads-deprecated.md).

# Sablier Automation Threads (deprecated)

<mark style="color:red;">**DEPRECATED - We now use MrSablier and MrSablierStaking gRPC rust client leveraging Triton Yellowstone. More info here**</mark> [MrSablier & MrSablierStaking (Open Source Keepers)](/adrena/technical-documentation/mrsablier-and-mrsablierstaking-open-source-keepers.md)

***

\
As described in [MrSablier & MrSablierStaking (Open Source Keepers)](/adrena/technical-documentation/mrsablier-and-mrsablierstaking-open-source-keepers.md), Adrena automates recurring tasks on-chain rather than using keepers. On chain automation is a glorified Keeper, but with a more robust interface, and a better separation of concerns.

***

#### Genesis Liquidity Program related automation&#x20;

In `add_pool_part_two` a <mark style="color:green;">thread is created</mark> to automatically terminate (one time) the program at the determined time.

In `add_genesis_liquidity` a <mark style="color:green;">thread is created</mark> to terminate this locked stake on behalf of the user at the end of the elected lock duration.

*For more info about the Genesis Liquidity Program, see* [Genesis Liquidity Program \[Terminated\]](/adrena/tokenomics/alp/genesis-liquidity-terminated/genesis-liquidity-program-terminated.md)

#### Staking related automation

In `init_staking_four` a <mark style="color:green;">thread is created</mark> to resolve staking round automatically (periodically).

In `create_locked_stake` a <mark style="color:green;">thread is created</mark> to terminate this locked stake on behalf of the user at the end of the elected lock duration.

In `init_user_staking` a <mark style="color:green;">thread is created</mark> to periodically claim rewards on behalf of the user.

In `finalize_locked_stake` the <mark style="color:red;">thread is cancelled</mark> if the instruction is called manually by the owner.

In `add_locked_stake` the auto-rewards-claim <mark style="color:blue;">thread is resumed</mark> if it was paused.

In `remove_liquid_stake` the auto-reward-claim <mark style="color:orange;">thread is paused</mark> if there isn't any stake left.

In `remove_locked_stake` the auto-reward-claim <mark style="color:orange;">thread is paused</mark>.

*For more info about Staking (Rounds, resolution, user\_staking...) see the technicals at* [Staking Implementation Details](/adrena/technical-documentation/staking-implementation-details.md)*.*

***

### Future plans

We plan to add support for on chain liquidation, similarly to the above.&#x20;

The twist for liquidations is that they are a function of a 2 parameters:

* asset price
* borrow fees

There are the 2 parameters that affect the position health dynamically and that need to be computed to know wether the position is under water. As it is currently, Sablier threads have triggers for a single on chain value. We are working on implementing a more general solution.

The other thing we have to add, is a existing threads cleanup instruction callabable by the user. That would cleanup past locked stakes thread for instance, and return remaining funds to the user.

***

###


---

# 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:

```
GET https://adrena.gitbook.io/adrena/technical-documentation/sablier-automation-threads-deprecated.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.
