> ## Documentation Index
> Fetch the complete documentation index at: https://docs-staging.centuari.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Currency Abstraction

> Automatic currency optimization for best rates across markets

## Overview

Currency Abstraction simplifies multi-currency lending by automatically analyzing rates across all supported stablecoins and suggesting optimal strategies. For users who don't want to manually compare EUR vs USD vs JPY rates, currency abstraction handles the complexity.

<Info>
  **Think of it as**: A smart assistant that finds the best fixed-rate opportunities across all currency markets, while respecting your preferences and risk tolerance.
</Info>

## How It Works

<Steps>
  <Step title="Analyze Markets">
    System scans all supported currency markets in real-time:

    * Current rates for each stablecoin
    * Liquidity depth
    * Historical rate stability
  </Step>

  <Step title="Match Preferences">
    Considers your settings:

    * Acceptable currencies
    * FX risk tolerance
    * Minimum rate threshold
  </Step>

  <Step title="Recommend Strategy">
    Suggests optimal currency:

    * "Lend in EURC at 6.5% APY (vs 5.8% USDC)"
    * Shows FX considerations if cross-currency
  </Step>

  <Step title="Execute (Optional)">
    With permission, can auto-convert and deploy to recommended market
  </Step>
</Steps>

## User Preferences

Configure currency abstraction to match your needs:

### Currency Whitelist

Select which currencies you're comfortable with:

```
✅ USD (USDC, USDT, DAI)
✅ EUR (EURC)
☐ JPY (JPYC)
☐ GBP (GBPT)
```

Only whitelisted currencies will be considered in recommendations.

### FX Risk Tolerance

<Tabs>
  <Tab title="No FX Risk">
    **Setting**: Same currency only

    Only recommends opportunities in your base currency. If you hold USD, only USD options shown.

    **Best for**: Users who want zero currency exposure
  </Tab>

  <Tab title="Low FX Risk">
    **Setting**: Major pairs only

    Allows recommendations in major currency pairs (USD/EUR, USD/JPY) with FX impact clearly shown.

    **Best for**: Users comfortable with some currency diversification
  </Tab>

  <Tab title="Full Optimization">
    **Setting**: All currencies

    Considers all whitelisted currencies, prioritizing absolute returns. FX impact shown but not filtered.

    **Best for**: Sophisticated users seeking maximum yield
  </Tab>
</Tabs>

### Minimum Rate Threshold

Set a floor rate below which you won't participate:

```
Minimum Rate: 5.0% APY
```

Recommendations will only include opportunities above this threshold.

## Recommendation Examples

### Example 1: USD Holder, Rate Optimization

**Your situation**:

* Holding: 50,000 USDC
* Settings: USD + EUR allowed, Low FX risk

**Current markets**:

| Currency | Best Rate | Maturity |
| -------- | --------- | -------- |
| USDC     | 5.8% APY  | 90 days  |
| EURC     | 6.5% APY  | 90 days  |

**Recommendation**:

```
💡 Recommended: Lend EURC at 6.5% APY

Expected return: $812 (vs $725 in USDC)
Additional yield: +$87 (+12%)

⚠️ FX Consideration:
- Requires conversion: USDC → EURC
- EUR/USD rate: 1.08
- Break-even: EUR can weaken 0.7% before USDC is better
```

### Example 2: Borrower, Minimize Cost

**Your situation**:

* Need: 30,000 USD equivalent
* Collateral: ETH
* Settings: All major currencies

**Current markets**:

| Currency | Best Rate | USD Equivalent |
| -------- | --------- | -------------- |
| USDC     | 7.2% APY  | \$2,160/year   |
| EURC     | 5.5% APY  | \$1,650/year   |
| JPYC     | 3.2% APY  | \$960/year     |

**Recommendation**:

```
💡 Recommended: Borrow JPYC at 3.2% APY

Interest savings vs USDC: $1,200/year

⚠️ FX Consideration:
- JPY has appreciated 5% vs USD this year
- If JPY strengthens 10%, savings reduced to $600
- Consider hedging if rate advantage is primary goal
```

## Auto-Execution Mode

With auto-execution enabled, currency abstraction can:

1. **Auto-Convert on Deposit**
   * You deposit USDC
   * System identifies EURC has better rates
   * Converts USDC → EURC automatically
   * Places lend order in EURC market

2. **Auto-Convert on Withdrawal**
   * Your EURC position matures
   * You want funds in USDC
   * Converts EURC → USDC automatically
   * Sends USDC to your wallet

### Safety Controls

<Warning>
  Auto-execution has built-in safety limits:
</Warning>

| Control                    | Setting                         |
| -------------------------- | ------------------------------- |
| Max slippage               | 0.5% (configurable)             |
| Max single conversion      | 50,000 USD equivalent           |
| Rate improvement threshold | Must be 0.5%+ better to trigger |
| User notification          | Always notified of conversions  |

## Integration with Easy Mode

Currency abstraction is **built into Easy Mode**:

* Easy Mode automatically considers multi-currency opportunities
* If EURC has significantly better rates than USDC, Easy Mode will suggest it
* User always confirms before any currency conversion
* No additional configuration needed

## Advanced: API Access

Programmatic access to currency abstraction:

```typescript theme={null}
import { Centuari } from '@centuari/sdk';

const client = new Centuari({ chainId: 42161 });

// Get optimal currency recommendation
const recommendation = await client.currencyAbstraction.recommend({
  action: 'lend',
  amount: 50000,
  baseCurrency: 'USD',
  allowedCurrencies: ['USD', 'EUR'],
  fxRiskTolerance: 'low',
  minRate: 0.05
});

console.log(recommendation);
// {
//   recommendedCurrency: 'EUR',
//   asset: 'EURC',
//   rate: 0.065,
//   maturity: '2025-06-01',
//   fxImpact: {
//     breakEvenMove: -0.007,
//     currentTrend: 'EUR strengthening'
//   }
// }
```

## Currency Conversion Mechanics

When currency abstraction triggers a conversion:

<Steps>
  <Step title="Quote Sourcing">
    Aggregates quotes from multiple DEXs (1inch, Paraswap, etc.)
  </Step>

  <Step title="Best Route Selection">
    Chooses route with lowest slippage and fees
  </Step>

  <Step title="Execution">
    Swaps through selected route
  </Step>

  <Step title="Deposit/Withdraw">
    Proceeds to intended action in target currency
  </Step>
</Steps>

### Fees

| Component    | Cost                                  |
| ------------ | ------------------------------------- |
| DEX swap fee | \~0.1-0.3% (market dependent)         |
| Centuari fee | 0% (no additional fee for conversion) |
| Gas          | Covered by protocol (gasless)         |

## When Not to Use Currency Abstraction

Currency abstraction may not be ideal if:

* **You have specific currency requirements** (e.g., EUR liabilities to match)
* **You're highly sensitive to FX risk** and rates don't justify exposure
* **You need exact amounts** and can't tolerate conversion slippage
* **You're operating under regulatory constraints** requiring specific currencies

In these cases, disable auto-suggestions and manually select your currency.

## FAQs

<AccordionGroup>
  <Accordion title="Can currency abstraction lose me money?">
    Rate optimization is not guaranteed. FX movements can offset rate advantages. Always review FX considerations in recommendations.
  </Accordion>

  <Accordion title="How often does it re-evaluate?">
    Continuously for new orders. Existing positions are not changed, recommendations only apply to new capital deployment.
  </Accordion>

  <Accordion title="Can I see historical recommendations accuracy?">
    Dashboard shows past recommendations and actual outcomes, helping you calibrate trust in suggestions.
  </Accordion>

  <Accordion title="Does it consider my tax situation?">
    No. Currency conversions may have tax implications. Consult a tax professional for your jurisdiction.
  </Accordion>
</AccordionGroup>

<Card title="Configure Currency Preferences" icon="sliders" href="https://app-staging.centuari.finance/settings">
  Set up your currency abstraction preferences
</Card>
