# Reward System

Our reward system uses a sophisticated mathematical model to calculate tokens based on riding behavior, subscription tier, user details, and system constraints. The following framework explains how various factors combine to determine rewards.

### Ride Quality Assessment

The system evaluates each ride using several key metrics:

#### Driving Score

Your driving behavior is quantified through a driving score that considers duration and phone interaction:

```
It = (TD × SV1)/InDS = max(0, 1 - (NoTIm/It))
```

Where:

* TD = Time driven (duration of ride)
* NoT = Number of touches (phone interactions)
* DS = Driving score (0-1)
* Other variables represent system constants

This creates a score that rewards longer rides with minimal phone interaction.

#### Base Credit Calculation

The system converts your driving score to base credits using a polynomial function:

```
BSC = SV2 × DS⁴ - SV2 × DS³ + (1/2)SV2 × DS² + (3/14)SV2 × DS
```

### Distance and Time Factors

Your ride's distance and duration affect rewards through these relationships:

```
KMM = SV3 × √KMDTM = SV4 × TD + SV5 × √TD
```

Where:

* KMD = Kilometers driven
* KMM = Kilometer multiplier
* TM = Time multiplier

### Progressive Reward Structure

#### Subscription Benefits

Subscription tiers determine the **full-reward segment size** and **multiplier**:

| Subscription | First Segment | Regular Segments | Multiplier |
| ------------ | ------------- | ---------------- | ---------- |
| Lite         | X km          | Y km             | 1.0        |
| Plus         | 3X km         | 3Y km            | 1.2        |
| Pro          | 7X km         | 3Y km            | 1.5        |
| Platinum     | 10X km        | 3Y km            | 5.5        |
| Custom       | 11X km        | 3Y km            | 6.0        |
| Elite        | 12X km        | 7Y km            | 7.0        |

#### Distance-Based Decay Model

The reward rate changes based on accumulated daily distance according to:

For position p km in daily riding:

* If p < F: Multiplier = 1.0 (full rewards)
* If p ≥ F:
  * Segment number = 1 + ⌊(p-F)/R⌋
  * Decay factor = 0.5^(Segment number)

Where:

* F = First segment size (varies by subscription)
* R = Regular segment size (varies by subscription)

### Comprehensive Reward Calculation

The complete mathematical model combines all these factors:

#### Segment-Based Analysis

For each segment i that a ride spans:

```
SegmentReward_i = M × C × d_i × B × MultiplierAt(p_i)
```

Where:

* M = Subscription multiplier
* C = Touch count penalty derived from driving score
* d\_i = Distance within segment i
* B = Base token rate derived from ride quality
* p\_i = Position at segment start = T + ∑(j=0 to i-1) d\_j
* T = Total distance already ridden today

#### Total Reward

```
Reward = ∑(i=0 to n-1) SegmentReward_i
```

### System-Wide Balance

To maintain economic balance, a final adjustment ensures proportional distribution:

```
AdjustedReward = Reward × (SystemAllocation / ∑(all rides) Reward)
```

### Key System Benefits

This mathematical framework creates several important behaviors:

* Safe riding is rewarded through the driving score calculation
* Higher subscription tiers receive both higher multipliers and larger full-reward segments
* Phone interactions reduce rewards through the driving score mechanism
* Consistent daily riding is incentivized over occasional long rides
* The system maintains economic balance while preserving relative reward proportions
