> For the complete documentation index, see [llms.txt](https://asterialabs-1.gitbook.io/asteriafi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asterialabs-1.gitbook.io/asteriafi/asteria-dev-plan.md).

# Asteria Dev Plan

## 📑 AsteriaFi Service Specification

Welcome to the official technical specification for AsteriaFi. This document outlines the core functional modules, token economy, and the dynamic withdrawal penalty system designed for long-term protocol stability and strategic asset management.

***

### 1. Token Economy & Assets

The ecosystem utilizes three specialized tokens to manage liquidity and yield distribution:

* **USDa (Stablecoin):** The native synthetic dollar of AsteriaFi, used for rewards and ecosystem participation.
* **asUSDT / asUSDa (Receipt Tokens):** Yield-bearing receipt tokens issued upon deposit, representing the user's claim on the underlying assets.

***

### 2. Core Functional Modules

| Module                  | Feature               | Description                                                                                                                                                                                         |
| ----------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **A. Asset Conversion** | **Mint & Redeem**     | <p>- <strong>Mint:</strong> Deposit USDT to mint USDa (<strong>0% fee</strong>).<br>- <strong>Redeem:</strong> Convert USDa back to USDT (Subject to available contract liquidity).</p>             |
| **B. Staking & Yield**  | **Vault Strategy**    | <p>- <strong>USDT Vault:</strong> <strong>0% Upfront Fee</strong>. Receive asUSDT + USDa Yield.<br>- <strong>USDa Vault:</strong> <strong>0% Upfront Fee</strong>. Receive asUSDa + USDa Yield.</p> |
| **C. Incentives**       | **Point Mining**      | Additional mining of AsteriaFi Points based on contribution, TVL, and duration.                                                                                                                     |
| **D. Liquidity Mgmt**   | **Withdrawal Policy** | Utilization of an **Early Withdrawal Penalty** and a **7-day FIFO Queue** to ensure strategic fund stability.                                                                                       |

***

### 3. Early Withdrawal Penalty (Linear Decay)

To protect the protocol's quantitative strategies (Delta-Neutral, Arbitrage, etc.) and ensure stable yield generation, AsteriaFi implements a **Linear Decay Penalty** for withdrawals requested within 40 days of the initial deposit.

The penalty is calculated based on the duration between the **Deposit Timestamp** and the **Withdrawal Request Timestamp**:

| Holding Period (Duration) | Penalty Rate  | Description                                                             |
| ------------------------- | ------------- | ----------------------------------------------------------------------- |
| **1 – 10 Days**           | **2.0%**      | Critical early exit fee to protect initial hedging and execution costs. |
| **11 – 30 Days**          | **1.0%**      | Standard short-term withdrawal fee.                                     |
| **31 – 40 Days**          | **0.5%**      | Final decay phase as the strategy reaches maturity.                     |
| **After 40 Days**         | **0% (Free)** | **No penalty.** Full access to principal and accumulated yield.         |

> 💡 **Strategic Allocation:** All penalty fees collected are redistributed to the protocol treasury or long-term USDa stakers to enhance ecosystem sustainability and reward loyal participants.

***

### 4. Withdrawal State Machine

Every withdrawal request transitions through three distinct on-chain states to ensure security and liquidity availability:

1. **Requesting:** The user submits a withdrawal request. The applicable **Penalty Rate** is locked based on the current holding duration. Assets are queued in the 7-day FIFO system.
2. **Processing:** Post-cutoff phase. The vault is locked, and the protocol retrieves liquidity from external **Delta-Neutral** strategies to the withdrawal pool.
3. **Claimable:** Liquidity is finalized and available. Users must trigger a manual 'Claim' transaction to move assets to their personal wallets.

***

### 5. Weekly Operational Timeline (30-Min Buffer)

AsteriaFi implements a 30-minute safety buffer between batch cycles to ensure data integrity and overcome network latency.

* **Monday 12:00 PM: Payout Initiation (Claimable)** The Admin Bot injects liquidity and updates the state of the current batch to 'Claimable'.
* **12:00 PM – 12:30 PM: Stability Window (30-Min Buffer)** This period allows for block confirmations and ensures the state update is fully broadcasted.
* **Monday 12:30 PM: New Queue Opening (Requesting)** The contract officially opens the window for the next batch of withdrawal requests.
* **Thursday 12:05 PM: Submission Deadline (Cutoff)** The window for the current batch closes, and the protocol enters the 'Processing' state.

***

### 6. Automation & Security

* **Decentralized Execution:** The operational timeline is strictly enforced by decentralized keepers (e.g., Chainlink Automation) that monitor block timestamps.
* **Risk Mitigation:** The 30-minute buffer is a sophisticated safeguard. It ensures that "Old Batch" data—including penalty calculations—is fully settled before "New Batch" requests begin, eliminating the risk of overlapping state variables.


---

# 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://asterialabs-1.gitbook.io/asteriafi/asteria-dev-plan.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.
