# Technical architecture

The Ledgity Yield protocol is composed of modular smart contracts that manage deposits, yield accrual, token utility, governance, and cross-chain interoperability.\
This section provides a clear overview of **how the contracts are organized and interact**.

> **Note:** Contract addresses will be added after the final V2 mainnet deployments and chain synchronizations.\
> Addresses are already defined in internal deployment manifests and will be published once audits and verification are finalized.

***

| Contract / Module             | Description                                                                 | Notes                                              |
| ----------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------- |
| **GlobalOwner**               | Controls upgrades and role assignments via multisig governance.             | Core security gate.                                |
| **GlobalPause**               | Can temporarily halt deposits/withdrawals in emergencies.                   | User funds remain safe & redeemable.               |
| **GlobalBlacklist**           | Ability to restrict malicious or sanctioned wallets.                        | Used only when necessary (AML / exploit response). |
| **LToken (lyUSDC / lyEURC)**  | Core vault contract. Manages deposits, withdrawals, and PPS-based yield.    | Users hold L-Tokens instead of idle stables.       |
| **WrappedLToken (ERC-4626)**  | DeFi-compatible wrapper for L-Tokens, enabling LP and lending integrations. | Used for DEX & money market composability.         |
| **FeeCollector**              | Gathers performance fees generated from real yield.                         | Feeds BuybackManager.                              |
| **BuybackManager**            | Executes LDY buybacks and redistributes tokens to veLDY stakers.            | Drives value capture flywheel.                     |
| **LDY Token**                 | Governance & utility token of the Ledgity Protocol.                         | Fixed supply, no inflation.                        |
| **LDYStaking (veNFT)**        | Lock-based staking system providing rewards, boosts, and governance power.  | Lock longer → more power & yield share.            |
| **Chainlink CCIP Router**     | Ensures secure cross-chain messaging without relying on custom bridges.     | Forms the backbone of multi-chain L-Tokens.        |
| **LTokenSignaler / Subgraph** | Indexing & data transparency layer.                                         | Powers dashboards, reporting & analytics.          |

### **System Overview**

The protocol is structured into **four layers**:

| Layer                            | Purpose                                                    |
| -------------------------------- | ---------------------------------------------------------- |
| **Admin & Safety Layer**         | Ownership, pause control, compliance & incident response   |
| **Vault & Yield Layer**          | Deposit / withdrawal logic, L-Tokens, PPS-based real yield |
| **Value Capture & Governance**   | LDY token, staking, revenue distribution, voting power     |
| **Cross-Chain & Indexing Layer** | Multi-chain deployments, bridging, analytics & reporting   |

***

### **Contract Structure Diagram**

```
                           ┌──────────────────────┐
                           │    GlobalOwner       │
                           │  (Multisig Control)  │
                           └─────────┬────────────┘
                                     │
         ┌───────────────────────────┴────────────────────────────┐
         │                     Admin Layer                         │
         │                                                         │
         │   GlobalPause         GlobalBlacklist                   │
         │   (Emergency)         (Compliance / Threat Response)    │
         └───────────────────────────┬────────────────────────────┘
                                     │
                                     ▼
         ┌────────────────────────────────────────────────────────┐
         │                   Vault & Yield Layer                   │
         │                                                        │
         │   LToken (lyUSDC / lyEURC) → Deposit / Withdraw        │
         │   Liquidity Buffer & Withdrawal Queue Logic            │
         │   WrappedLToken (ERC-4626) for DeFi integrations       │
         │                                                        │
         └───────────────────────────┬────────────────────────────┘
                                     │
                                     ▼
         ┌────────────────────────────────────────────────────────┐
         │         Value Capture & Governance Layer                │
         │                                                        │
         │   FeeCollector → BuybackManager → LDYStaking (veNFT)   │
         │   LDY Governance Token                                 │
         │   veLDY Voting Power + Boosts                          │
         │                                                        │
         └───────────────────────────┬────────────────────────────┘
                                     │
                                     ▼
         ┌────────────────────────────────────────────────────────┐
         │         Cross-Chain & Indexing Layer                    │
         │                                                        │
         │   Chainlink CCIP Router                                │
         │   LTokenSignaler → Subgraph (Data / Dashboard)         │
         │   Multi-chain deployments (Base / Arbitrum / …)        │
         │                                                        │
         └────────────────────────────────────────────────────────┘
```


---

# 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.ledgity.finance/technical-information/technical-architecture.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.
