# Protocol Mechanics

Robust on-chain mechanics keep Juris Protocol fair, transparent, and capital-efficient. This chapter explains the critical plumbing layers that power the ecosystem: the Oracle and Price Calculation Module and the Stablecoin Balance and Fee Mechanism.

***

### Oracle and Price Calculation Module

Accurate pricing is the heartbeat of a secure decentralized finance protocol. It directly influences several core areas:

* Borrowing Safety: Collateral valuation drives Health Factor calculations and liquidation triggers.
* Lending Yields: The bonding-curve annual percentage rate sets live deposit and borrow rates based on real-time pool usage.
* Portfolio Accuracy: Dashboards display reliable values for every token you hold or trade.

#### Data Sources and Architecture

To maintain defense-in-depth accuracy, Juris combines validator votes, inter-blockchain communication packets, and time-weighted average price smoothing.

| **Asset Group** | **Primary Feed**                                                    | **Fallback and Redundancy**                                                                   | **Update Window**        |
| --------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------ |
| Terra-Native    | Terra Classic Oracle: Median of validator price votes.              | thirty-block time-weighted average price smoothing.                                           | Every block.             |
| Cosmos Assets   | Inter-blockchain communication Price Packets: Relayed from Osmosis. | Cross-checked with CoinGecko application programming interface on InterPlanetary File System. | thirty to sixty seconds. |
| External Majors | Band Standard Dataset: Community oracle set.                        | Chainlink Oracle Cloud Redwood pushed via Wormhole.                                           | sixty seconds.           |

***

### Stablecoin Balance and Fee Mechanism

#### What is the Stable Balance?

The Stable Balance is a unique sub-account within each connected wallet specifically for holding fee-tokens.

* Segregated Storage: Tokens are held in a dedicated smart-contract vault and are never mixed with collateral.
* Predictable Costs: Fees and interest are deducted from this stable-denominated pot, preventing the forced sale of volatile assets.
* Seamless User Experience: One click covers all upcoming payments; dashboards project how many days of borrow interest your balance can fund.

#### Fee Streams and Distribution

Juris Protocol accrues value through usage-based fees that sustain the ecosystem and its contributors.

| **Action**          | **Fee Token** | **Who Pays?** | **Rate and Formula**                         | **Destination**          |
| ------------------- | ------------- | ------------- | -------------------------------------------- | ------------------------ |
| Borrow Interest     | Stablecoin    | Borrower      | Dynamic annual percentage rate debited daily | Lenders and Treasury     |
| Account Creation    | Stablecoin    | Borrower      | Flat percentage of maximum borrow power      | Treasury                 |
| Liquidation Penalty | Collateral    | Borrower      | Percentage of auction fill                   | Liquidators and Treasury |
| Bridge Service      | Stablecoin    | User          | Percentage of notional value                 | Relayer Pools            |

> \[!NOTE]
>
> Deflationary Synergy: Treasury fees are periodically converted into the native protocol token for buy-back and burn or to top up staking rewards as mandated by governance.

***

#### Key Takeaways <a href="#key-takeaways" id="key-takeaways"></a>

* **Oracle Security:** Pricing is protected by a multi-layered verification system to prevent manipulation.
* **Operational Ease:** The Stable Balance decouples fees from volatile assets, enabling sophisticated strategies without constant micromanagement.
* **Sustainability:** Together, these mechanics ensure Juris remains economically viable for lenders, borrowers, stakers, and traders alike.
