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

# Staking

> Deposit USDC to earn yield in the Trust Vault

# Staking USDC

Earn passive yield by staking USDC in the Trust Vault.

## How to Stake

<Steps>
  <Step title="Navigate to Trust Vault">
    Go to the **Trust** tab and select **Vault**
  </Step>

  <Step title="Enter Amount">
    Input the amount of USDC you want to stake
  </Step>

  <Step title="Confirm Transaction">
    Review the details and confirm. Your wallet will process the transaction.
  </Step>

  <Step title="Receive tmUSDC">
    You'll receive tmUSDC tokens representing your stake
  </Step>
</Steps>

## Understanding tmUSDC

**tmUSDC** (Trust Mint USDC) is your receipt token:

```typescript theme={null}
interface tmUSDCPosition {
  balance: number;        // Your tmUSDC balance
  exchangeRate: number;   // Current tmUSDC/USDC rate
  usdcValue: number;      // balance * exchangeRate
  earnedYield: number;    // Total yield earned
}
```

### Exchange Rate

The exchange rate starts at 1.0 and increases over time as interest is earned:

```
Day 0:   1 tmUSDC = 1.0000 USDC
Day 30:  1 tmUSDC = 1.0066 USDC (+0.66%)
Day 90:  1 tmUSDC = 1.0200 USDC (+2%)
Day 365: 1 tmUSDC = 1.0800 USDC (+8%)
```

## Current Rates

<Info>
  Rates are variable and depend on vault utilization. Check the app for current rates.
</Info>

| Metric        | Current Value |
| ------------- | ------------- |
| Supply APY    | \~8%          |
| Total Staked  | \$X,XXX,XXX   |
| Utilization   | XX%           |
| Exchange Rate | 1.XXXX        |

## Withdrawal

You can withdraw your staked USDC at any time (subject to liquidity):

<Steps>
  <Step title="Navigate to Vault">
    Go to **Trust** > **Vault** > **Withdraw**
  </Step>

  <Step title="Enter Amount">
    Specify how much tmUSDC to redeem (or "Max" for all)
  </Step>

  <Step title="Receive USDC">
    Your tmUSDC is burned and USDC is returned at the current exchange rate
  </Step>
</Steps>

<Warning>
  If vault utilization is very high (>95%), withdrawals may be delayed until borrowers repay or new deposits arrive.
</Warning>

## Yield Calculation

Your yield is calculated based on:

```typescript theme={null}
function calculateYield(position: Position): number {
  const currentValue = position.tmUSDC * getCurrentExchangeRate();
  const originalValue = position.depositedUSDC;

  return currentValue - originalValue;
}

// Example
const deposited = 1000;  // USDC
const tmUSDC = 1000;     // Received at rate 1.0
const currentRate = 1.08; // After 1 year

const currentValue = 1000 * 1.08; // 1080 USDC
const yield = 1080 - 1000;        // 80 USDC profit
```

## API Integration

Stake programmatically via the API:

```bash theme={null}
# Stake USDC
curl -X POST "https://api.usmewe.com/v1/vault/stake" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"amount": 1000}'
```

```bash theme={null}
# Check position
curl -X GET "https://api.usmewe.com/v1/vault/position" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

<Card title="API Reference" icon="code" href="/developers/api-reference/vault">
  Full Vault API documentation
</Card>
