# Introduction

## The Problem

We find ourselves at the heart of the AI revolution, a transformative era where jobs are increasingly being taken over by AI applications and robotics. The challenge is that AI isn't working for everyday people, but rather for big corporations and wealthy investors who can afford to invest in and create AI systems for their own benefit.

A crucial question emerges: How can everyday people harness the value of the AI revolution to ensure AI works for them, rather than leaving them behind? This challenge is what KiraAI's mission aims to solve.

## The Solution

We need to build a mechanism without barriers that allows everyone to participate in harnessing AI's power, working for their benefit while automatically distributing profits.

Let us introduce [Kira Kuru,](/overview/our-solution/meet-kira-kuru) our AI Agent hedge fund manager with a proven [track record](https://kira.trading/analytics/). Kira excels at selecting optimal delta-neutral strategies to capture trading opportunities in the crypto market. These opportunities include:

* [Funding rate arbitrage](/trust/delta-neutral-and-arbitrages/funding-rate-strategy)
* [Spread arbitrage](/trust/delta-neutral-and-arbitrages/spread-arbitrage)
* [MEV arbitrage](/trust/delta-neutral-and-arbitrages/mev-arbitrage)

These strategies can continuously generate returns without exposing users to excessive risks. Kira has demonstrated reliable and consistent profit generation, as evidenced by our track record: <https://kira.trading/analytics/>


# Our Solution

KiraAI: AI Agent Hedge Fund for All

### How Kira Makes Money

In the near term, the primary source of income comes from our AI-trained trading agent Kira, who captures delta-neutral and arbitrage opportunities. Our major strategies currently include Coin-Futures Funding Rate Farming, Spread Arbitrage, and MEV (Miner Extractable Value).

<figure><img src="/files/kcS9o3BzQiCWKFPZkUTx" alt=""><figcaption></figcaption></figure>

In the long term, income will be derived from our community-owned robotic and AI Agent services. These services will extend beyond financial markets (where Kira operates) to include opportunities like autonomous driving taxis and household service robots. [Learn more.](#how-kira-makes-money)

### Kira Kuru Token (KRA)

How is the income generated by Kira distributed?

By owning KRA tokens, holders automatically own profits generated by Kira. As Kira generates more profits, the value of KRA tokens increases. These profits are used to participate in KRA trading on the secondary market. Holders can buy and sell their KRA tokens on publicly available markets. Through this mechanism, profits are automatically redistributed back to KRA holders. [Learn more.](#kira-kuru-token-kra)

### USDi Token&#x20;

USDi is an interest-bearing, delta-neutral synthetic dollar. It forms the backbone for distributing the wealth created by Kira. Income generated by the community-owned  KiraAI will be automatically distributed to USDi holders, based on the amount they hold and the length of time they hold it.  [Learn more.](#usdi-token)

### How to Get USDi?&#x20;

General individuals or DAOs can obtain USDi through multiple methods:

1. Swapping existing crypto assets on-chain
2. Purchasing directly with fiat currency through node operators via:
   * Bank transfer
   * Cash

Additionally, community members can earn USDi by becoming node operators and committing their time to running a node. Learn more.


# Meet Kira Kuru

Your personal AI hedge fund manager

<figure><img src="/files/0YTgN7596OVWS8c4dWSn" alt=""><figcaption></figcaption></figure>

There are four core functionalities that enable Kira to perform reliably and generate stable yields: strategy picking, modeling, heuristics and simulation.

### Trading Strategy Picking

Kira analyses the crypto market to identify optimal delta-neutral trading strategies, prioritizing those with superior Sharpe ratios for maximum risk-adjusted returns.

### Modeling

Kira leverages historical market trading data to train and optimize our models, fine-tuning parameters for optimal yield capture.

### Heuristics

Kira adopts heuristic techniques to help her funds achieve consistent risk-adjusted returns by removing emotional bias, enabling quick decision-making in fast markets, and providing a systematic framework for portfolio management that can be scaled across multiple delta neutral strategies.

### Simulation&#x20;

Kira Implements automated stress-testing protocols and market simulations for comprehensive risk management across diverse market scenarios.


# KRA Token

The Kirakuro Token (KRA)

KRA is the meme token for Kirakuro, our first AI Agent Hedge Fund Manager. By owning KRA, holders own a portion of Kirakuro. All future profits, value, and other benefits created by Kira belong to KRA token holders.

### Fair Launch

KRA is built by the community and fair-launched exclusively for the community. There are no pre-sales, private sales, or pre-mining events for the KRA token.

### Governance and Benefits

KRA holders can vote to decide Kira's growth path and help make critical decisions about her training and evolution. Additionally, KRA holders have exclusive advantages such as access to special boosting events. Kirakuro needs your help to decide key configurations for her portfolio through KRA holders' voting. Here is a list of key configurations:

<table><thead><tr><th width="211">Configurations</th><th width="438">Discription</th><th>Value</th></tr></thead><tbody><tr><td>Reserve %</td><td>the percentage that distributed to reserve pool</td><td>100%</td></tr><tr><td>Risks Tolerance</td><td>the risks exposure level</td><td>20%</td></tr><tr><td>Rewards Frequency </td><td>the frequency to distribute profits </td><td>Monthly</td></tr><tr><td>Yield Booster</td><td>the booster rewards for KRA token holders</td><td>10%</td></tr><tr><td>Target APY </td><td>A target APY</td><td>20%</td></tr></tbody></table>


# USDi Token

An interest-bearing synthetic dollar

### The USDi Token&#x20;

Contract Address on Solana: [CXbKtuMVWc2LkedJjATZDNwaPSN6vHsuBGqYHUC4BN3B](https://solscan.io/token/CXbKtuMVWc2LkedJjATZDNwaPSN6vHsuBGqYHUC4BN3B)

USDi is an interest-bearing synthetic dollar with a stable 1:1 value ratio to USD, featuring automatic interest distribution with no gas fees required for claims. Holders can transfer USDi to anyone at any time without disqualifying their yield gains. An index tracks the amount and holding period of each USDi holder, with longer holding periods and larger amounts earning proportionally higher yields.

USDi is backed by its underlying fully hedged assets, and the intrinsic market cap value of USDi should always equal the total value of these hedged assets. Yield generated from the portfolio steadily increases the total asset value. When it surpasses a certain threshold and the total asset value significantly exceeds USDi in circulation, new USDi is minted and distributed to all USDi holders as profit gains. If the USDi in circulation ever exceeds the total asset value, the difference will be covered by burning USDi from the Kira's reserve pool by sending it to the locked account, thereby reducing circulation.

We will publish more detailed USDi pegging mechanisms when we are ready to launch the USDi token.

#### Where to Get USDi Token?

After the launch of USDi, users can acquire it through three methods:

1. Chatting with Kira
2. Minting and redeeming through the USDi portal (<https://app.kira.trading>)
3. Buying and selling through DEXs like [Jupiter Swap](https://jup.ag/), [Raydium Swap](https://raydium.io/swap/)  on the secondary market


# Human-error Free with AI Automation:

The beauty of AI Algorithms

<figure><img src="/files/nMApixzxxptW7GNmQ554" alt=""><figcaption></figcaption></figure>

### The Beauty of Mathematics and AI Algorithms

With Kira's self-evolving decision trees, we no longer rely on human judgment but on trading data and mathematics. This helps eliminate human errors and bias throughout the entire process: optimized strategy selection, simulation and model training, stress testing, and execution. The system is fully autonomous, run entirely by Kira.


# Simulator

the purpose of the simulator is to give the most optimized configurations for 0max1 monitor. This recommended configurations is based on historic backtest simulation results.

Steps:

```
1. Start

2. Read Data 
Raw history funding rates data ('df'): fatched by Monitor.
Simulation Configurations Data ('simulations_df'): contains multiple simulations with varying configurations in each simulation.

4. Define Functions
'token_score_func(symbol, simulations_id, model_num)': 
It is used to calculate the scores for every token within each simulation. 
'simulation_apr_func(Tokens_names, simulations_id, model_num)':
It is used to calculate the APR for each simulation based on the top tokens that are selected by their scores.

5. Model Generation Process 
    - The model initially selects a 'simulations_id' from 'simulations_df'
    - Generates the simulation 10 times over 30 days, utilizing 90 data points at a frequency of every 3 days (yielding 9 data points each)
    - Calculates scores for every 40 tokens within each generation by using the function 'token_score_func(symbol, simulations_id, model_num)' 
    - Selectes the top tokens ('Token_names') based on their scores ('top3_score')
    - Calculates the realized APR of the simulation ('cal_apr') by using the function 'simulation_apr_func(Token_names, simulations_id, model_num)'
    - Stores all 10 generations realized APRs for this single simulation in 'simulation_total_apr'
    - Computes the average APR and stores in 'simulation_avg_apr'
    - Repeat the process for every simulation and the results are stored in 'sorted_simulation_avg_apr'
    - The whole model generation process will repeat every 30 days (90 data points)

6. Collect and Prepare Final Data
Compile all processed and optimized realized APR into a final DataFrame 'max_realized_apr'
Format and sort each simulation's realized APR score and merge it with Simulation Configurations Data 'simulations_df'

7. Output Results
Display the final DataFrame 'final_output'
```


# Design

## Raw data:

* **Historical Funding Rates Data (df):** this DataFrame reads the CSV file containing original historical funding rate data collected by Monitor. To verify the simulation, you can use the monitor by restricting the time range and resetting the weight and allocation.
* **Simulation Configurations Input (simulations\_df):** this dataframe reads the CSV file containing inputs for different period funding rate weights and allocation weights for each simulation. These are the configurations that will be used to calculate tokens' scores and the simulation's realized APRs. (**Simulations\_df** is created by **Weight\_Generator**)
  * **funding rate weights inputs**: are established for a token's average funding rates over different periods—3 days, 7 days, 30 days, previous funding rate, and next funding rate within a simulation. These funding rate weights are defined in the code as&#x20;

    ```python
    WEIGHTS = [W3, W7, W30, W_prev, W_next]
    ```
  * **allocation weights inputs:** are determined for the top-ranked tokens selected based on their scores within a simulation. These allocation weights are defined in the code as&#x20;

    ```python
    ALLOCATIONS = [A1, A2, A3]
    ```

## Calculations:

**symbol:** token's name&#x20;

$$symbol∈unique(df\[′symbol′])$$

**simulations\_id:** index id of the specific simulation in 'simulations\_df'

$$simulation\_id∈Simulation:ID\[0,1,2,3,4,5,...., n],   \ :::where : Simulation: ID \isin simulations\_df$$

**model\_num:** is the number represents the $$ith$$ generation for a simulation that generates in the model&#x20;

$$model\_num \isin \[1,2,3,4,5,6,7,8,9,10]$$ &#x20;

**group:** is the subset of 'df' where the token symbol matches $$symbol$$, specifically the funding rate data.

$$\bold{i}$$: calculates index based on the length of 'group', the model number, and other factors. This will identify the rates that will be collected, beginning with index $$i$$.&#x20;

$$i = (len(group)::mod:90)+(model\_num−1)×9$$

$$\bold{W}$$: List of weight arrays, where each weight array corresponds to a particular simulation&#x20;

$$weights=\[W\_j​\[simulations\_id] : for : W\_j​ : in :WEIGHTS]$$

$$\bold{A}$$: List of allocation weight arrays, where each allocation weight array corresponds to a particular rank for a token that selected in a simulation

$$allocations =\[A\_j​\[simulations\_id] : for : A\_j​ : in :ALLOCATIONS]$$

* **Token Scores Function 'token\_score\_func(symbol, simulations\_id, model\_num)':** is a function to calculate all tokens' scores of a simulation in a single generation.&#x20;

  **Average Periodic APR Calculations:** Calculate average funding rates over different periods and scale them to get APRs. For the APR calculations for different periods

$$
APR\_3 = Mean(group\[i: i+9])\times 3\times360\times100
\\
APR\_7 = Mean(group\[i: i+21])\times 3\times360\times100
\\
APR\_{30} = Mean(group\[i: i+90])\times 3\times360\times100
\\
APR\_{prev} = Mean(group\[i+1])\times 3\times360\times100
\\
APR\_{next} = Mean(group\[i])\times 3\times360\times100
$$

$$
token\_score\_func= \displaystyle\sum\_{k}^m(APR\_k(symbol, i) × W\_k\[simulation\_id]) ,
\\
for: k \isin m =\[3,: 7, :30, :prev,:next]
$$

* **Simulation Realized APR Function 'simulation\_apr\_func(Tokens\_names, simulations\_id, model\_num)':** is a function to calculate a simulation's APR in a single generation, using the top 3 tokens chosen by **Token Scores Function**.

  **Average 3 days funding rate:** Calculate average funding rate over 3 days for the token identified by 'symbol' that selected by its score in a simulation.

$$
avg\_3Days\_rate = Mean(group\_{symbol}\[i-9 : i])
$$

$$
simulation\_apr\_func= \displaystyle\sum\_{j}^r(avg\_3Days\_rate(symbol\_j) × A\_j\[simulation\_id]) ,
\newline
for: j \isin r =\[1,: 2, :3, :...],
\newline
\
'r':represents:top:token's:rank:in:a:simulation.
$$

* **Average Simulation APR in all generations ('simulation\_avg\_apr')**:  is a average realized APR of a single simulation in all 10 generations.

$$
simulation\_{avg}\_{apr} =  \displaystyle\sum\_{h=1}^{T}simulation\_apr\_func\_{h} ::\div:: T
\\
for: h\isin model\_num ,
\\
where :
T = \sum{model\_num},
\\
$$

## Output data:

**Final Output ('final\_output'):** final output is a merged table that includes 'funding\_rate\_weight\_df' with an additional column called 'Realized APR' and 'Tokens'. 'Realized APR' contains the average APRs from each of the 9 simulations across a total of 10 generations."

**The Most Optimized Configurations:** is the recommend configuration selected from a simulation with the highest 'Realized APR' in the final output, which will be fed into the monitor.&#x20;


# Sample Codes

## Input:

**Weight Generator**

* **Weight Part**

```python
import pandas as pd
import numpy as np
import itertools

def generate_weights_with_constraints_25(num_weights, num_simulation=70):
    possible_values = [0, 0.25, 0.5, 0.75, 1]
    simulations = []
    
    # Generate all possible combinations
    all_combinations = list(itertools.product(possible_values, repeat=num_weights))
    valid_combinations = [combo for combo in all_combinations if np.isclose(sum(combo), 1)]
    
    simulations = np.random.choice(len(valid_combinations), num_simulation, replace=False)
    simulations = [valid_combinations[i] for i in simulations]

    return simulations

# For 0.25 interval, total number of simulation are 70
num_weights = 5
num_simulation = 70

simulations = generate_weights_with_constraints_25(num_weights, num_simulation)
simulations = pd.DataFrame(simulations
```

* **Allocation Part**

```python
def generate_allcations_with_constraints_10(num_allocations, num_simulation=70):
    possible_values = [0, 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0]
    simulations = []
    
    # Generate all possible combinations
    all_combinations = list(itertools.product(possible_values, repeat=num_allocations))
    valid_combinations = [combo for combo in all_combinations if np.isclose(sum(combo), 1)]
    
    simulations = np.random.choice(len(valid_combinations), num_simulation, replace=False)
    simulations = [valid_combinations[i] for i in simulations]

    return simulations

# For 0.1 interval, total number of allocations are 66
num_allocations = 3
num_simulation = 66

allocations_simulation = generate_allcations_with_constraints_10(num_allocations, num_simulation)
allocations_simulation = pd.DataFrame(allocations_simulation)
```

* **Data Combination**

```python
simulations['Re-Balance Frequence Day'] = 3
allocations_simulation['Re-Balance Frequence Day'] = 3


simulations_df = pd.merge(simulations, allocations_simulation, on='Re-Balance Frequence Day')
simulations_df = simulations_df.reset_index()

simulations_df = simulations_df.rename(columns={'index': 'Simulation ID',
                                       '0_y':'% Allocation for Priority 1', 
                                       '1_y':'% Allocation for Priority 2', 
                                       '2_y': '% Allocation for Priority 3',
                                       '0_x': 'Previous Funding Rate APR Weight',
                                       '1_x': 'Next Funding Rate APR Weight',
                                       '2_x': '3 Day Cum Funding APR Weight',
                                       3: '7 Day Cum Funding APR Weight',
                                       4: '30 Day Cum Funding APR Weight'
                                       })

simulations_df.to_csv('new_funding_rate_weight_df_2.csv', index=False)
```

**Simulation Configurations Input:**&#x20;

* **funding rate weights input**
* **allocation weights input**

**Historical Funding Rates Data:**

```python
simulations_df = pd.read_csv('/~path/funding_rate_weight_df.csv')

# Define the weights by properly calling tolist() with parentheses
W3 = simulations_df['3 Day Cum Funding APR Weight'].tolist()
W7 = simulations_df['7 Day Cum Funding APR Weight'].tolist()
W30 = simulations_df['30 Day Cum Funding APR Weight'].tolist()
W_next = simulations_df['Next Funding Rate APR Weight'].tolist()
W_prev = simulations_df['Previous Funding Rate APR Weight'].tolist()
A1 = simulations_df['% Allocation for Priority 1'].tolist()
A2 = simulations_df['% Allocation for Priority 2'].tolist()
A3 = simulations_df['% Allocation for Priority 3'].tolist()
F = simulations_df['Re-Balance Frequence Day'].tolist()

# Global weights for APR calculation
WEIGHTS = [W3, W7, W30, W_prev, W_next]
ALLOCATIONS = [A1, A2, A3]
```

**Creating feasible DataFrame**

```python
# Load the data
with open('historical_funding_rates_0707.json', 'r') as file:
    data = json.load(file)

frames = []
for symbol, records in data.items():
    df = pd.json_normalize(records)
    df['symbol'] = symbol
    
    # Check if 'fundingRate' exists in the dataframe and convert to numeric
    if 'fundingRate' in df.columns:
        df['fundingRate'] = pd.to_numeric(df['fundingRate'], errors='coerce')
    else:
        df['fundingRate'] = pd.NA  # Assign a missing value indicator if 'fundingRate' is not present
    
    frames.append(df)

# Concatenate all frames into a single DataFrame
df = pd.concat(frames, ignore_index=True)

# Convert 'fundingTime' from milliseconds to a datetime object
df['fundingTime'] = pd.to_datetime(df['fundingTime'], unit='ms')

# Split 'fundingTime' into separate date and time components
df['date'] = df['fundingTime'].dt.date
df['time'] = df['fundingTime'].dt.time

# Drop rows where any column has NaN values
df = df.dropna()

# Sort by 'date' in descending order
df = df.sort_values(by='date', ascending=False)

# Display the first few rows to verify
df = df[['symbol', 'date', 'time', 'fundingRate', 'markPrice']]
```

## Math functions & formulas:

* **Token Scores Function:**

  **'token\_score\_func(symbol, simulations\_id, model\_num)'**
* **Simulation Realized APR Function:**

  **'simulation\_apr\_func(Tokens\_names, simulations\_id, model\_num)'**&#x20;

```python
def token_score_func(symbol, simulations_id, model_num):

    group = df.loc[df['symbol'] == symbol, 'fundingRate']
    i = len(group) % 90 + (model_num - 1) * 9

    aprs = [
        group.iloc[i : i + 9].mean() * 3 * 360 * 100,
        group.iloc[i : 21 + i].mean() * 3 * 360 * 100,
        group.iloc[i : 90 + i].mean() * 3 * 360 * 100,
        group.iloc[1 + i] * 3 * 360 * 100,
        group.iloc[i] * 3 * 360 * 100 
    ]
    
    #simulations_id = simulations_id - 1 
    weights = [W[simulations_id] for W in WEIGHTS]  # Gather weights for each APR based on simulation ID
    
    # Calculate the weighted APR score
    apr_score = sum(apr * weight for apr, weight in zip(aprs, weights))
    
    return apr_score
```

```python
def simulation_apr_func(Tokens_names, simulations_id, model_num):
    top3_rates = []

    for symbol in Tokens_names:
        group = df.loc[df['symbol'] == symbol, 'fundingRate']
        i = len(group) % 90 + (model_num - 1) * 9
        rates = group.iloc[i - 9 : i ].mean()
        top3_rates.append(rates)
    
    allocations = [A[simulations_id] for A in ALLOCATIONS]
    sim_apr = sum(rate * allocation for rate, allocation in zip(top3_rates, allocations)) * 360 * 3
    
    return sim_apr
```

```python
token_score = {}
simulaiton_id = simulations_df.index.tolist()
model_nums = range(1,11)
token_score_rank = []
simulation_avg_apr = {}

for id in simulaiton_id:
    simulation_total_apr = 0  

    for i in model_nums:
        token_score = {}
        simulation_apr = {}

        for symbol in symbols:        
            score = token_score_func(symbol, id, i)
            token_score[(symbol, id, i)] = score

        top3_score = dict(sorted(token_score.items(), key=lambda item: item[1],reverse=True)[:3])

        Token_names = [key[0] for key in top3_score.keys()]

        cal_apr = simulation_apr_func(Token_names, id, i)

        simulation_apr[(f'Model Num {i}', f'Simulation {id}')] = cal_apr
        simulation_total_apr += cal_apr 

    simulation_avg_apr[id] = simulation_total_apr / len(model_nums)


sorted_simulation_avg_apr = dict(sorted(simulation_avg_apr.items(), key=lambda item: item[1], reverse=True))
sorted_simulation_avg_apr
```

## Output

* **Funding rate weight and Portfolio allocation configurations for monitor**

```python
max_realized_apr = [
    {'Simulation ID': key, 'Realized APR': value}
    for key, value in sorted_simulation_avg_apr.items()
]

max_realized_apr_token = [
    {'Simulation ID': key, 'Tokens': value}
    for key, value in simulation_top3_token.items()
]

max_realized_apr = pd.DataFrame(max_realized_apr)
max_realized_apr.reset_index(drop=True, inplace=True)

max_realized_apr_token = pd.DataFrame(max_realized_apr_token)

max_realized_apr = pd.merge(max_realized_apr, max_realized_apr_token, on='Simulation ID')
max_realized_apr.to_csv('max_realized_apr_may.csv', index=False)
max_realized_apr
```

<figure><img src="/files/RksFlXmdq69XAoJ9yFwW" alt=""><figcaption><p>max_realized_apr</p></figcaption></figure>


# Monitor

The goal of the monitor is to give live suggestions of portfolio target allocation %, based on pre-decided configurations from 0max1 simulator. It takes input from the exchange public API and calculate Apr score for each asset then give suggestions.


# Process

**Process:**&#x20;

```
1. Start
﻿
2. Set API Key
Retrieve the Binance API key from environment variables.
﻿
3. Fetch All Futures Symbols
Use get_futures_symbols() to get a list of all futures symbols available on   Binance.
﻿
4. For Each Symbol, Fetch Funding Rate History
Loop through each symbol.
Use get_funding_rate_history(symbol, 60) to fetch the last 60 days' worth of funding rate data for each symbol.
﻿
5. Data Processing and APR Calculation
For each dataset fetched:
Calculate 3-day, 7-day, and 30-day average funding rates.
Annualize these averages to get APRs by multiplying the average rates by 365 and converting to percentage.
Store these calculations in the DataFrame.
﻿
6. Optimize APR Score
For the funding rate data of each symbol, use optimize_apr_score(group) to compute the optimized APR score based on weighted averages of the 3-day, 7-day, 30-day, and the most recent funding rates.
﻿
7. Collect and Prepare Final Data
Compile all processed and optimized data into a final DataFrame.
Format and sort data based on optimized APR scores.
﻿
8. Output Results
Display the final DataFrame.
```


# Definitions

<pre><code>1. Environment Setup:
api_key: This variable retrieves the API key from the environment variables to securely access the Binance API without hardcoding sensitive information.

2. Global Constants:
Weights (WEIGHTS): These are coefficients used to calculate the Annual Percentage Rate (APR) score based on the funding rates over various periods. They reflect the importance of each period's funding rate in determining the overall APR score. The weights are defined as follows:
W3: Weight for the 3-day  funding rate.
W7: Weight for the 7-day  funding rate.
W30: Weight for the 30-day  funding rate.
W_next: Weight for the next funding rate.
W_prev: Weight for the previous funding rate.

<strong>3. Function Definitions:
</strong>get_futures_symbols(): Calls the Binance API to retrieve a list of all available futures symbols.
get_funding_rate_history(symbol, display_days=30): Fetches the funding rate history for a specified futures symbol over a set number of days from the Binance API.
calculate_apr_score(group): Computes the APR score for a given dataset of funding rates using predefined weights. This score helps in assessing the profitability of each contract.

4. Data Retrieval and Processing:
Initially, all futures symbols are fetched and stored.
For each symbol, its funding rate history is retrieved for the last 60 days.
This data is then processed to compute the APR score using the function calculate_apr_score.

<strong>5. Data Aggregation and Output:
</strong>All the processed data is aggregated into a DataFrame.
The DataFrame is sorted by APR score, and the top 5 entries are assigned allocation percentages based on their rankings.
The final DataFrame is formatted for readability and saved as a CSV file named APR.csv.
<strong>
</strong>6. Post-Processing:
Certain columns in the DataFrame are formatted as percentages for clarity.
The DataFrame includes columns like symbol, time, funding rates, APR score, and allocation percentage, making it informative and easy to understand.
</code></pre>


# Sample codes and details.

## Sample Code:

```python
import requests
import pandas as pd
import os
import websocket
import json
import ssl
import threading
import datetime

# Set Binance API Key as an environment variable
api_key = os.getenv('BINANCE_API_KEY')
latest_funding_rates = {}

def on_message(ws, message):
    global latest_funding_rates
    data = json.loads(message)
    if 'stream' in data:
        symbol = data['stream'].split('@')[0].upper()  # Extract symbol from stream name in uppercase
        latest_funding_rates[symbol] = float(data['data']['r'])  # Store the rate

def on_error(ws, error):
    print("Error:", error)

def on_close(ws, code, reason):
    print(f"WebSocket closed with code {code}, reason {reason}")

def on_open(ws):
    global streams
    symbols = get_futures_symbols()
    streams = [f"{symbol.lower()}@markPrice" for symbol in symbols]
    subscribe_message = json.dumps({
        "method": "SUBSCRIBE",
        "params": streams,
        "id": 1
    })
    ws.send(subscribe_message)

def connect_websocket():
    websocket.enableTrace(False)
    ws = websocket.WebSocketApp("wss://dstream.binance.com/stream",
                                on_open=on_open,
                                on_message=on_message,
                                on_error=on_error,
                                on_close=on_close)

    def run_ws():
        ws.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE})

    thread = threading.Thread(target=run_ws)
    thread.start()
    return ws, thread

def get_futures_symbols():
    url = 'https://dapi.binance.com/dapi/v1/exchangeInfo'
    headers = {'X-MBX-APIKEY': api_key}
    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        data = response.json()
        symbols = [item['symbol'] for item in data['symbols'] if item['contractType'] == 'PERPETUAL']
        return symbols
    return []

# Global weights for APR calculation
WEIGHTS = [W3, W7, W30, W_prev, W_next]

def calculate_apr_score(group, symbol):
    symbol = symbol.upper()  # Ensure the symbol is in uppercase
    aprs = [
        group.head(9)['fundingRate'].mean() * 3 * 360 * 100,
        group.head(21)['fundingRate'].mean() * 3 * 360 * 100,
        group.head(90)['fundingRate'].mean() * 3 * 360 * 100,
        group.iloc[1]['fundingRate'] * 3 * 360 * 100,
        latest_funding_rates.get(symbol, group.iloc[0]['fundingRate']) * 3 * 360 * 100  # Use real-time rate if available
    ]
    apr_score = sum(apr * weight for apr, weight in zip(aprs, WEIGHTS))
    return apr_score

def get_funding_rate_history(symbol, display_days=30):
    url = 'https://dapi.binance.com/dapi/v1/fundingRate'
    params = {'symbol': symbol, 'limit': display_days * 3}
    headers = {'X-MBX-APIKEY': api_key}
    response = requests.get(url, params=params, headers=headers)
    if response.status_code == 200:
        data = response.json()
        df = pd.DataFrame(data)
        df['fundingRate'] = pd.to_numeric(df['fundingRate'], errors='coerce')
        df['Time'] = pd.to_datetime(df['fundingTime'], unit='ms', utc=True).dt.tz_convert(None)
        return df.sort_values('Time', ascending=False).head(display_days)
    return pd.DataFrame()

def process_data():
    ws, thread = connect_websocket()
    thread.join(timeout=30)  # Wait for the WebSocket to collect data
    symbols = get_futures_symbols()
    all_data_frames = []

    for symbol in symbols:
        df = get_funding_rate_history(symbol, 60)
        if not df.empty:
            df['symbol'] = symbol
            all_data_frames.append(df)

    final_data_list = []
    for data in all_data_frames:
        symbol = data['symbol'].iloc[0]
        apr_score = calculate_apr_score(data, symbol)
        latest_data = data.sort_values('Time', ascending=False).iloc[0].to_dict()
        latest_data['Previous Funding Rate'] = data.iloc[1]['fundingRate'] * 360 * 3 * 100
        latest_data['Next Funding Rate'] = latest_funding_rates.get(symbol, data.iloc[0]['fundingRate']) * 360 * 3 * 100
        latest_data['3 Day Cum Funding APR'] = data.head(9)['fundingRate'].mean() * 360 * 3 * 100
        latest_data['7 Day Cum Funding APR'] = data.head(21)['fundingRate'].mean() * 360 * 3 * 100
        latest_data['30 Day Cum Funding APR'] = data.head(90)['fundingRate'].mean() * 360 * 3 * 100
        latest_data['APR Score'] = f"{apr_score:.3f}%"
        # Select only the desired columns
        final_data_list.append({
            'symbol': latest_data['symbol'],
            'Time': latest_data['Time'],
            'Previous Funding Rate': f"{latest_data['Previous Funding Rate']:.3f}%",
            'Next Funding Rate': f"{latest_data['Next Funding Rate']:.3f}%",
            '3 Day Cum Funding APR': f"{latest_data['3 Day Cum Funding APR']:.3f}%",
            '7 Day Cum Funding APR': f"{latest_data['7 Day Cum Funding APR']:.3f}%",
            '30 Day Cum Funding APR': f"{latest_data['30 Day Cum Funding APR']:.3f}%",
            'APR Score': latest_data['APR Score']
        })

    final_data = pd.DataFrame(final_data_list)
    final_data.sort_values('APR Score', ascending=False, inplace=True)
    # Add timestamp to file name
    timestamp = datetime.datetime.utcnow().strftime('%Y-%m-%d_%H-%M-%S_UTC')
    file_name = f'APR_results_{timestamp}.csv'
    final_data.to_csv(file_name, index=False)
    print(f"Data saved to '{file_name}'")

    if ws.sock and ws.sock.connected:
        ws.close()

if __name__ == "__main__":
    process_data()
```

## **Math formula**

<pre><code>1. Average Funding Rate Calculation:
Average Funding Rate_n = (Sum of Funding Rates over the last n periods) / n
Here, n represents the number of periods, such as 3, 7, or 30 days.

<strong>2. Annualization of the Funding Rate:
</strong>Annualized Funding APR_n = Average Funding Rate_n x 360 x 3 x 100
This converts the average funding rate for n days into an annual percentage rate by multiplying by the number of days in a year (365) and then converting it to a percentage by multiplying by 100.

3. APR Score Calculation with Weights:
APR Score = (Annualized Funding APR_3 x W_3) + (Annualized Funding APR_7 x W_7) + (Annualized Funding APR_30 x W_30) + (Annualized Funding APR_next x W_next) + (Annualized Funding APR_prev x W_prev)
The APR Score is calculated by taking the weighted average of several Annualized Funding APRs for different periods. This is done by multiplying each Annualized Funding APR by its respective weight and then summing up these products.
</code></pre>

## **Output**

<figure><img src="/files/8aMeU0GotiUkITiRnXn7" alt=""><figcaption></figcaption></figure>


# Delta Neutral and Arbitrages

Kira only picks delta-neutral and arbitrage trading opportunities. This approach avoids underlying asset price fluctuation risks and can generate predictable future cash flows. Since this is the very beginning of our fully Autonomous AI Agent hedge fund, building a successful track record is key to gaining everyone's trust.

1. Delta-Neutral - Price fluctuation is completely excluded
   1. [Future Funding Rate Arbitrage](/trust/delta-neutral-and-arbitrages/funding-rate-strategy)
   2. [Spread Arbitrage](/trust/delta-neutral-and-arbitrages/spread-arbitrage)
2. Arbitrage - Risk-free execution, especially when automated by AI
   1. [DeFi MEV](/trust/delta-neutral-and-arbitrages/mev-arbitrage)
   2. [CeFi-DeFi MEV](/trust/delta-neutral-and-arbitrages/mev-arbitrage)


# Funding Rate Strategy

Farming the coin future market funding fees

<figure><img src="/files/QVkXIC14mMmuhsItebev" alt=""><figcaption></figcaption></figure>

All arbitrage trades by 0max1 are risk-free, offering stable and secure returns.

* Stable yield ranged between 10% \~ 35% APY  passive income.
* All open positions and spot crypto assets are hedged against each other.


# Spread Arbitrage

<figure><img src="/files/QJt04VadzmhDLULPfq1A" alt=""><figcaption></figcaption></figure>

Stable yield ranged between 8% \~ 25% APY passive income.

Delivery Futures contracts always converge with Spot prices at expiration dates.


# MEV Arbitrage

<figure><img src="/files/Xz4UJ6jxcyQZXcxxWw3s" alt=""><figcaption></figcaption></figure>

Onchain arbitrage bundles, completed within the same block to generate passive income.

The revenue is the price spread between different swap pools and the cost is on chain gas fees.


# Transparency and Auditability

1\) All transaction records and portfolio positions are publicly available for public auditing;

2\) Real-time audits on-chain.

List of Addresses&#x20;

{% tabs %}
{% tab title="Solana" %}

<table data-full-width="true"><thead><tr><th width="183">Name </th><th>Contract Address</th></tr></thead><tbody><tr><td>KRA Token</td><td>AY2Qidgrky4TFymeJKe36w5buY7QWK7TSd7obQLupump</td></tr><tr><td>KRA Treasury</td><td>3JaJjXxmMHSfrqVrBrTWR9oM377JNdmuLfLLDJfbKRDQ</td></tr><tr><td>USDi Token</td><td>CXbKtuMVWc2LkedJjATZDNwaPSN6vHsuBGqYHUC4BN3B</td></tr><tr><td>USDi Creator</td><td>9PJYcoB7yiSoVAwfURavGcwxHS3mgPMZYRCAVfwrAjXo</td></tr><tr><td>USDi Ex</td><td>4dJ5ATt3BbJPrbYCZGLAXndi5DPaZZY9j1Sp8Hdh4ApH</td></tr><tr><td>USDi C2C Ex</td><td>Arqe1a33PSbXCHaqKVeKW16QnJPAMM1Bhmfj6UANvX8Q</td></tr><tr><td>Interest Distribution</td><td>5yVFyMtzCKbU5WY5DtcMiu12tAG6g6TqU9yVAXL9Twpr</td></tr></tbody></table>
{% endtab %}

{% tab title="Ethereum" %}

|   |   |   |
| - | - | - |
|   |   |   |
|   |   |   |
|   |   |   |

{% endtab %}
{% endtabs %}


# Terminology

<table><thead><tr><th width="131">Terminology</th><th>Definition</th><th data-hidden>Calculation</th></tr></thead><tbody><tr><td>total return</td><td>The net realized absolute return for the period of time selected</td><td></td></tr><tr><td>NAV per USDi</td><td>The current value of one USDi unit based on total assets</td><td></td></tr><tr><td>Cumulative Interest</td><td>The total interest earned and paid out to date</td><td></td></tr><tr><td>30-Day Interest</td><td>The estimated interest you will earn over the next 30 days</td><td></td></tr><tr><td>30 Day APY</td><td>The annual percentage yield calculated based on the past 30 days' performance</td><td></td></tr><tr><td>90 Day APY</td><td>The annual percentage yield calculated based on the past 90 days' performance</td><td></td></tr><tr><td>Implied APY</td><td>The estimated annual percentage yield based on current rates</td><td></td></tr><tr><td>Implied 30 Days Earnings</td><td>The estimated total earnings for the protocol over the next 30 days</td><td></td></tr><tr><td>Net Exposure Value</td><td>The total value of unhedged assets</td><td></td></tr><tr><td>TVL</td><td>Current total value of all assets under management.</td><td></td></tr><tr><td>30 Day Net Earnings</td><td>The total actual earnings achieved over the past 30 days</td><td></td></tr><tr><td>Portfolio</td><td>Buy and Sell trading pair for funding rate arbitrage</td><td></td></tr><tr><td>Latest funding rate</td><td>The annual percentage yield calculated based on the next funding fees</td><td></td></tr><tr><td>previous funding APY</td><td>The annual percentage yield calculated based on the latest funding fees</td><td></td></tr><tr><td>3 Day Cum Funding APY</td><td>The annual percentage yield calculated based on the past 3 days funding fees</td><td></td></tr><tr><td>7 Day Cum Fudding APY</td><td>The annual percentage yield calculated based on the past 7 days funding fees</td><td></td></tr><tr><td>30 Day Cum Funding APY</td><td>The annual percentage yield calculated based on the past 30 days funding fees</td><td></td></tr><tr><td>Total Assets Value</td><td>Current total value of all managed assets</td><td></td></tr></tbody></table>


# APIs for Funding ARB Analytics

### Endpoints

### 1. Logging In (\*\*\*Required First Step \*\*\*)

* Endpoint: /login&#x20;
* Method: POST&#x20;
* Description: login and retrieve JWT token

a. Request

* Headers: Content-Type: application/json&#x20;
* Query Parameters: None
* Body:
  * username (string): The username of the user.
  * password (string): The password of the user.

b. Responce

* Status Code: 200 OK
* Body:

```
{ "access_token": "<access_token>", "refresh_token": "<refresh_token>" }
```

c. Example

```
fetch('https://max1-funding-arb.uc.r.appspot.com/login', {
   method: 'POST',
   headers: {
       'Content-Type': 'application/json'
   },
   body: JSON.stringify({
       username: 'username',
       password: 'password'
   })
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
```

### 2. Get Raw Data Table (requires JWT token)

* Endpoint: /raw\_data\_table
* Method: GET
* Description: Retrieves all records from the raw\_data\_table.

a. Request

* Headers: None
* Query Parameters: None
* Body: None

b. Response

* Status Code: 200 OK
* **Body:** JSON array of objects containing the raw data records.

c. Example

```
fetch('https://max1-funding-arb.uc.r.appspot.com/raw_data_table', {
   method: 'GET',
   headers: {
       'Authorization': 'Bearer YOUR_JWT_TOKEN_HERE'
   }
})
.then(response => {
   if (!response.ok) {
       throw new Error('Network response was not ok');
   }
   return response.json();
})
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
```

d. Response Example

```
[
{"funding_id":1,"fundingrate":"-0.00021167","fundingtime":1713456000000,"markprice":"63515.40000000","symbol":"BTCUSD_PERP","time":"Thu, 27 Jun 2024 08:03:24 GMT"},
{"funding_id":2,"fundingrate":"-0.00029339","fundingtime":1713484800000,"markprice":"63477.88531564","symbol":"BTCUSD_PERP","time":"Thu, 27 Jun 2024 08:03:24 GMT"},
  …
]
```

### 3.1  Get Portfolio Track Records (requires JWT token)

* Endpoint: /portfolio\_track\_records
* Method: GET
* Description: Retrieves all records from the portfolio\_track\_records table.

a. Request

* Headers: None
* Query Parameters:
* &#x20; \- page (optional): The page number to retrieve. Defaults to all records if not provided.
* &#x20; \- limit (optional): The number of records per page. Defaults to all records if not provided.
* Body: None

b. Response

* Status Code: 200 OK
* Body: JSON array of objects containing the portfolio track records.

c. Example

```
fetch('https://max1-funding-arb.uc.r.appspot.com/portfolio_track_records?page=1&limit=60, {
   method: 'GET',
   headers: {
       'Authorization': 'Bearer YOUR_JWT_TOKEN_HERE'
   }
})
.then(response => {
   if (!response.ok) {
       throw new Error('Network response was not ok');
   }
   return response.json();
})
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

```

d. Response Example

```
{[ 
{"id":1,"money_at_risk_percent":"-0.7635539234855009","net_exposure_value":"-0.7577440087800085","portfolio_implied_30days_earnings":"0.8605773848134116","portfolio_implied_apr":"0.10406109150689863","timestamp":"Fri, 28 Jun 2024 04:20:33 GMT","total_assets_value":"99.23909569098001"},

{"id":2,"money_at_risk_percent":"-0.7301864268488106","net_exposure_value":"-0.7248933446900026","portfolio_implied_30days_earnings":"0.8606027411036695","portfolio_implied_apr":"0.10402641079258573","timestamp":"Fri, 28 Jun 2024 07:05:01 GMT","total_assets_value":"99.27510537526001"},
…..
],
"total_records": 120, 
"page": 1, 
"limit": 60
}
```

### 3.2 Get Latest Portfolio Data food a time range (requires JWT token)

* Endpoint: /track\_records\_daily\_latest
* Method: GET
* Description: retrieves the latest records for each day up to 1:00 UTC within a specified date range. If no date range is provided, it fetches the latest records up to 1:00 UTC for all available days.

a. Request

* Headers: None
* Query Parameters:&#x20;
* &#x20; \- start\_date (optional, string, format: YYYY-MM-DD
* &#x20; \- The start date of the range from which to fetch records.
* &#x20; \- Example: 2024-08-03
* &#x20; \- end\_date (optional, string, format: YYYY-MM-DD)
* &#x20; \- The end date of the range up to which to fetch records.
* &#x20; \- Example: 2024-09-02
* Body: None

b. Response

* Status Code: 200 OK
* Body: JSON array of objects containing the track of records data.

c. Example

```
fetch('https://max1-funding-arb.uc.r.appspot.com/track_records_daily_latest?start_date=2024-08-03&end_date=2024-09-02', {
   method: 'GET',
   headers: {
       'Authorization': 'Bearer YOUR_JWT_TOKEN_HERE'
   }
})
.then(response => {
   if (!response.ok) {
       throw new Error('Network response was not ok');
   }
   return response.json();
})
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
// Some code
```

### 4. Get Portfolio Latest Data (requires JWT token)

* Endpoint: /portfolio\_latest
* Method: GET
* Description: Retrieves all records from the portfolio\_latest table.

a. Request

* Headers: None
* Query Parameters: None
* Body: None

b. Response

* Status Code: 200 OK
* Body: JSON array of objects containing the latest portfolio data.

c. Example

```
fetch('https://max1-funding-arb.uc.r.appspot.com/portfolio_latest', {
   method: 'GET',
   headers: {
       'Authorization': 'Bearer YOUR_JWT_TOKEN_HERE'
   }
})
.then(response => {
   if (!response.ok) {
       throw new Error('Network response was not ok');
   }
   return response.json();
})
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
```

d. Response Example

```
[ 
{"amount":"6.8792","assets_types":"Crypto","assets_value":"62.2633","implied_apr":"0.0","mark_price":"9.051","order_value_required":"0.0","portfolio_allocation":"0.6271","product_category":"Coin-M Futures","symbol":"UNI","target_allocation_percent":"0.0","utc_timestamp":"Tue, 02 Jul 2024 08:20:19 GMT"},
{"amount":"0.2512","assets_types":"Crypto","assets_value":"37.0242","implied_apr":"0.0","mark_price":"147.389","order_value_required":"0.0","portfolio_allocation":"0.3729","product_category":"Coin-M Futures","symbol":"SOL","target_allocation_percent":"0.0","utc_timestamp":"Tue, 02 Jul 2024 08:20:19 GMT"},

  …
]
```

### 5. Get Monitor APR Attribute Data (requires JWT token)

* Endpoint: /monitor\_apr\_attribute
* Method: GET
* Description: Retrieves all records from the monitor\_apr\_attribute table.

a. Request

* Headers: None
* Query Parameters: None
* Body: None

b. Response

* Status Code: 200 OK
* Body: JSON array of objects containing the monitor APR attribute data.

c. Example

```
fetch('https://max1-funding-arb.uc.r.appspot.com/monitor_apr_attribute', {
   method: 'GET',
   headers: {
       'Authorization': 'Bearer YOUR_JWT_TOKEN_HERE'
   }
})
.then(response => {
   if (!response.ok) {
       throw new Error('Network response was not ok');
   }
   return response.json();
})
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
```

d. Response Example

```
[
 {"30_day_cum_funding":"0.09370907999999999","3_day_cum_funding":"0.1376676","7_day_cum_funding":"0.07607777142857143","allocation_percentage":"0.4","apr_id":1,"apr_score":"0.1449632622857143","next_funding_rate":"0.2306664","previous_funding_rate":"0.14273280000000002","simulator_id":null,"symbol":"BNBUSD_PERP","time":"Thu, 27 Jun 2024 08:00:00 GMT"},

{"30_day_cum_funding":"0.12468504000000001","3_day_cum_funding":"0.13084440000000003","7_day_cum_funding":"0.09699222857142857","allocation_percentage":"0.35","apr_id":2,"apr_score":"0.11432026971428573","next_funding_rate":"0.10800000000000001","previous_funding_rate":"0.10800000000000001","simulator_id":null,"symbol":"RUNEUSD_PERP","time":"Thu, 27 Jun 2024 08:00:00 GMT"},
…..
]

```

### 6. Refresh Token

1. Endpoint: /refresh
2. Method: POST
3. Description: This endpoint allows a user to refresh their access token using a valid refresh token.

a. Request

* Headers&#x20;
  * Authorization: Bearer \<refresh\_token>
  * Content-Type: application/json
* Body: None

b. Response

* Status Code: 200 OK
* Body: {"access\_token": "\<new\_access\_token>"}

### 7. Trigger Cloud Function DataSync

1. Endpoint: /run\_dataSync
2. Method: GET
3. Description: Triggers the dataSync function to fetch data and store into database&#x20;

a. Request

* Headers: None
* Query Parameters: None
* Body: None

b. Response

* Status Code: 200 OK
* Body: None

### 8. Trigger Cloud Run Monitor

1. Endpoint: /run\_monitor
2. Method: GET
3. Description: Triggers the monitor instance to fetch data and store into database

a. Request

* Headers: None
* Query Parameters: None
* Body: None

b. Response

* Status Code: 200 OK
* Body: None

### 9. Trigger Cloud Run Portfolio

1. Endpoint: /run\_portfolio
2. Method: GET
3. Description: Triggers the portfolio instance to fetch data and store into database

a. Request

* Headers: None
* Query Parameters: None
* Body: None

b. Response

* Status Code: 200 OK
* Body: None


# C2C Network

The Crypto to Cash (C2C) Network is a global protocol that connects cryptocurrency holders with cash holders. The protocol facilitates seamless exchanges between crypto and traditional cash, providing users with a secure and efficient way to conduct transactions worldwide.

### How does it work?

#### Members

Members can mint or redeem their USDi through the C2C Network option. Our globally available node operators will fulfill requests within 2 days. [Learn more about the detailed process.](/dao/c2c-network/c2c-redemption-process)

#### Node Operators

Node operators are verified individuals who have staked a specific amount of KRA tokens. If any service issues occur, their tokens will be slashed by the network. Individual transactions cannot exceed 60% of their staked KRA value. [Learn more about the detailed process.](/dao/c2c-network/c2c-node-operator)

### Who facilitates the C2C Network transactions?

Kira, our AI Agent, facilitates transactions and communications between network participants. This ensures smooth, secure, and efficient coordination of exchanges across the network.

***

{% hint style="info" %}
This documentation is regularly updated. Please check back for the latest information about Kira Club services.
{% endhint %}


# C2C Node Operator

### What are the benefits of becoming a C2C Node Operator?

As a C2C Node Operator, you'll enjoy:

* Zero fees for your own crypto and cash exchanges
* Earn transaction fees of 1-2% on all fulfilled transactions
* Access to view all available crypto-to-cash and cash-to-crypto requests across the network

### How can I become a C2C Node Operator?

Becoming a node operator is straightforward:

* Maintain a minimum balance of 1 million KRA tokens in your wallet
* No staking or token locking required

###

{% hint style="info" %}
Start earning fees today by becoming a C2C Node Operator. The process is simple and requires no token locking.
{% endhint %}

***

*Last updated: \[Current Date]*


# C2C Redemption Process

Here's a step-by-step guide to redeeming USDi through the C2C network.

### 1. Submit Redemption Request

<figure><img src="/files/7wqiM2ke7CGbAUGS19fJ" alt=""><figcaption></figcaption></figure>

To initiate a redemption:

* Choose the "Redeem to Cash" option in the C2C network
* Enter your desired redemption amount (e.g., 100,000 USDi)
* Review and confirm the transaction details
* Follow your wallet's process to transfer USDi to the designated collateral account

{% hint style="info" %}
Your USDi will be held in the collateral account until you confirm receipt of funds.
{% endhint %}

### 2. Network Matching

Once your request is submitted:

* The system matches you with available C2C network node operators
* Matched operators will coordinate the delivery location and time
* After receiving cash, scan the operator's QR code
* Submit the operator's wallet address as the fund release address
* Transaction status will update to "Cash Received"

<figure><img src="/files/zcNUdeAZavE8c2S4ikaY" alt=""><figcaption></figcaption></figure>

### 3. Confirmation Process

After confirming cash receipt:

* Our backend system submits the redemption request to the provided wallet address
* Transaction status changes to **Redeem Requested**
* The operator must verify:
  * The incoming redemption request in their wallet
  * The amount matches their entitled redemption

### 4. Fund Release

* The USDi held in the collateral account will be released to the node operator within 24 hours of confirmation

{% hint style="warning" %}
Node operators should always verify that the redemption amount matches the cash they provided before confirming the transaction.
{% endhint %}


# Payment methods and fees

Here are the available payment methods for the C2C network with corresponding fees and amount limits.

| Payment methods | Processing time | Amount limit        | Fees  |
| --------------- | --------------- | ------------------- | ----- |
| Bank Wire       | 2 days          | larger than $10,000 | 1  %  |
| Zelle           | 24 hrs          | $100 \~ $10,000     | 0.5 % |
| Venmo           | 24 hrs          | $100 \~$3,000       | 0.5 % |
| Alipay          | 24 hrs          | $5,000 \~ $50,000   | 1 %   |
| Cash - Paper    | 2 days          | larger than $10,000 | 1 %   |

Cash (Paper Delivery) Available in select cities:

* North America: San Francisco, New York City, Los Angeles
* Asia: Hong Kong, Singapore, Beijing, Shanghai, Shenzhen

Exchange Rate: The best market rate on the delivery date applies for non-USD transactions.


# Kira Club

## Club Member Benefits

<table><thead><tr><th>Benefits by Tier</th><th data-type="checkbox">General Member</th><th data-type="checkbox">Silver VIP</th><th data-type="checkbox">Gold VIP</th><th data-type="checkbox">Sapphire VIP</th></tr></thead><tbody><tr><td>USDi Yield</td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td>C2C Fiat Off -Ramps</td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td>Kira AI Agent</td><td>false</td><td>true</td><td>true</td><td>true</td></tr><tr><td>Mint with Wire</td><td>false</td><td>false</td><td>true</td><td>true</td></tr><tr><td>C2C Operator</td><td>false</td><td>false</td><td>false</td><td>true</td></tr><tr><td>Exclusive Perks</td><td>false</td><td>false</td><td>false</td><td>true</td></tr></tbody></table>

## VIP Qualifications

<table><thead><tr><th width="185">VIP Tiers</th><th>KRA Balance</th><th>Referral</th><th>KRA Staking</th></tr></thead><tbody><tr><td>Silver VIP</td><td>>=100,000 KRA</td><td></td><td></td></tr><tr><td>Gold VIP</td><td>>=200,000 KRA</td><td>referred by another Gold VIP</td><td></td></tr><tr><td>Sapphire VIP</td><td>>=200,000 KRA</td><td>refereed by another Sapphire VIP</td><td>>=1,000,000 KRA</td></tr></tbody></table>


# Referral Program

### Overview

The Kira Referral Program rewards users for bringing friends to the USDi ecosystem. When you refer others to use and own USDi, you'll receive ongoing rewards based on their earned interest.

### How It Works

#### Earning Rewards

* Refer friends to use and own USDi
* Receive 10% of all future USDi interest earned by your referrals as an additional bonus
* This bonus is paid from the Kira protocol and is NOT deducted from your friends' earnings
* Rewards are paid in KRA tokens

#### Reward Distribution

* KRA tokens are automatically distributed to your wallet
* Payments occur whenever your referrals receive USDi interest distributions
* No claiming process required - rewards are sent directly to your wallet

#### Program Benefits

* **Lifetime Earnings**: There is no expiration date on referral rewards
* **Passive Income**: Earn continuously through your network's USDi usage
* **Automatic Payments**: Receive KRA tokens without any manual action
* **Win-Win Program**: Your friends keep 100% of their earned interest while you receive additional rewards

Start referring today and build your passive income stream with Kira!


