# Asynchronous Reward Compounding

In sophisticated DeFi strategies, yield is often composed of **Synchronous Yield** (intrinsic interest accrual) and **Asynchronous Rewards** (external incentives). For an Atomist curating a Fusion Vault, the temporal gap between earning a reward and compounding it into the vault's `totalAssets()` creates a dynamic where the share price may temporarily deviate from the strategy's "true" economic value.

This gap results in one of two effects depending on TVL fluctuations: **Dilution** or **Concentration**.

### The Compounding Gap

#### Synchronous Accrual

Base lending protocols (like Aave or Morpho) usually provide synchronous yield. When a Fusion Vault calls `updateMarketsBalances()`, the vault's share price immediately reflects the interest earned or the costs incurred (e.g., borrowing fees).

#### Asynchronous Accrual

Many incentive programs (e.g., $ARB, $OP, or $MORPHO) accrue rewards on external distributor contracts. These assets are "invisible" to the vault's exchange rate until the Atomist:

1. **Claims** tokens via the `RewardsClaimManager`.
2. **Converts** them to the underlying asset via the `UniversalTokenSwapper`.
3. **Re-deposits** them, effectively increasing `totalAssets()`.

### Temporal Effects: Inflow vs. Outflow

Because the share price only accounts for assets currently tracked within the vault's storage, the value of pending (unclaimed) rewards exists "off-balance-sheet."

#### 1. Reward Dilution (Capital Inflow)

If a large deposit occurs after a reward has been earned but before it is compounded, the new capital receives a pro-rata share of rewards it did not help earn. This is particularly noticeable in leveraged strategies where the vault has already realized the synchronous *cost* of the leverage (borrowing fees) but has not yet realized the asynchronous *upside* (incentives).

#### 2. Reward Concentration (Capital Outflow)

Conversely, if a significant portion of the TVL is withdrawn before the compounding point, the remaining shareholders benefit from "positive dilution." The rewards earned by the total capital are now distributed among a smaller pool of shares, making the compounding event accretive to the remaining users.

### Technical Example: 7-Day Compounding Cycle

Consider a Fusion Vault utilizing a leveraged supply strategy.

**Initial State:**

* **TVL:** 1,000,000 USDC
* **Total Supply:** 1,000,000 shares (Price: 1.0000)
* **Strategy:** 3% APY borrow cost to farm a reward token yielding 5% APY.

**Accrual Period (7 Days):**

The vault maintains the position for one week.

**Synchronous Cost (C):**

$$
C = \frac{Assets \times Rate\_{borrow} \times Days}{365} = \frac{1,000,000 \times 0.03 \times 7}{365} \approx 575.34
$$

**Asynchronous Reward (R):**

$$
R = \frac{Assets \times Rate\_{reward} \times Days}{365} = \frac{1,000,000 \times 0.05 \times 7}{365} \approx 958.90
$$

**State at Day 7 (Pre-Compounding):**

The borrow cost is realized via `updateMarketsBalances()`, but the reward is pending.

* **Total Assets:** 999,424.66 USDC
* **Share Price:** 0.99942

#### Scenario A: Large Inflow (Dilution)

A user deposits 4,000,000 USDC right before compounding.

* **New Total Supply:** $$1,000,000 + (4,000,000 / 0.99942) \approx 5,002,321$$ shares.
* **Post-Compounding Price:** After adding the 958.90 USDC reward:

$$Price = \frac{4,999,424.66 + 958.90}{5,002,321} \approx 1.00001$$

*Note: The original users lose nearly all their net yield to the new capital inflow.*

#### Scenario B: Large Outflow (Concentration)

Users withdraw 500,000 USDC right before compounding.

* **New Total Supply:** 500,000 shares remaining.
* **Post-Compounding Price:** After adding the 958.90 USDC reward to the remaining 499,424.66 USDC assets:

$$Price = \frac{499,424.66 + 958.90}{500,000} \approx 1.00076$$

*Note: The remaining users receive a higher share price because they capture the rewards earned by the capital that just exited.*

### Strategic Management for Atomists

Atomists should manage the compounding gap to ensure fairness and strategy stability.

#### 1. Compounding Frequency

Increasing the frequency of reward realization (e.g., daily instead of weekly) minimizes the window for both dilution and concentration, keeping the share price closer to the strategy's fair value.

#### 2. Onboarding Contributions

The `FeeManager` can be used to set a **Onboarding Contribution**. This fee acts as an "entry contribution" that can offset the dilution of existing shareholders, effectively pricing in the value of pending rewards for new participants.

#### 3. Scaling and Velocity

Atomists should monitor TVL Velocity. Strategies with high asynchronous components should be scaled carefully. Sudden spikes in TVL can be managed using `setTotalSupplyCap()`, allowing the vault to grow in stages that align with compounding cycles.
