Mathematical Foundations of FCM
This document explains the mathematical models and formulas that power Flow Credit Market. Understanding these fundamentals helps you reason about system behavior and make informed decisions.
These mathematical foundations ensure FCM operates predictably and safely. All formulas are implemented on-chain and can be verified by examining the smart contracts.
Core Variables
Token-Level Variables
| Variable | Symbol | Description |
|---|---|---|
| Price | $P_t$ | Price of token $t$ in MOET terms |
| Collateral Factor | $CF_t$ | Usable percentage of token $t$ value (0 < $CF_t$ ≤ 1) |
| Borrow Factor | $BF_t$ | Multiplier for borrowed token $t$ (typically 1.0) |
| Amount | $A_t$ | Quantity of token $t$ |
Position-Level Variables
| Variable | Symbol | Description |
|---|---|---|
| Effective Collateral | $EC$ | Total usable collateral value in MOET |
| Effective Debt | $ED$ | Total debt value in MOET |
| Health Factor | $HF$ | Ratio of collateral to debt |
| Target Health | $TargetHF$ | Desired health ratio (typically 1.3) |
| Min Health | $MinHF$ | Minimum before rebalancing (typically 1.1) |
| Max Health | $MaxHF$ | Maximum before rebalancing (typically 1.5) |
Interest Variables
| Variable | Symbol | Description |
|---|---|---|
| Interest Index | $I_t(n)$ | Interest index for token $t$ at time $n$ |
| Scaled Balance | $ScaledBalance$ | Balance divided by interest index |
| True Balance | $TrueBalance$ | Actual balance including accrued interest |
| Interest Rate | $r$ | Annual interest rate |
Fundamental Formulas
1. Effective Collateral
The effective collateral is the sum of all collateral assets multiplied by their prices and collateral factors:
_10EC = ∑(A_t × P_t × CF_t), t ∈ Collateral
Example:
_10Collateral assets:_10- 1000 FLOW @ $1 each, CF = 0.8_10- 500 USDC @ $1 each, CF = 0.9_10_10EC = (1000 × 1 × 0.8) + (500 × 1 × 0.9)_10 = 800 + 450_10 = $1250 MOET
2. Effective Debt
The effective debt is the sum of all borrowed assets multiplied by their prices and borrow factors:
_10ED = \sum_t \in Debt A_t × P_t × BF_t
Borrow Factor (BF) is a risk adjustment multiplier applied to debt. While typically set to 1.0 for standard assets like MOET, the borrow factor can be increased above 1.0 for riskier or more volatile borrowed assets. This makes the effective debt higher than the nominal debt, requiring more collateral to maintain the same health factor. For example, a BF of 1.2 means borrowing $100 of that asset counts as $120 of effective debt, providing an extra safety margin for the protocol.
Example:
_10Debt:_10- 800 MOET @ $1 each, BF = 1.0_10_10ED = 800 × 1 × 1.0_10 = $800 MOET
3. Health Factor
The health factor is the ratio of effective collateral to effective debt:
_10HF = (EC / ED)
Critical thresholds:
- $HF < 1.0$: Position is liquidatable
- $HF = 1.0$: Exactly at liquidation threshold
- $HF > 1.0$: Position is solvent
Example:
_10EC = $1250, ED = $800_10_10HF = 1250 / 800 = 1.5625
4. Maximum Borrowing Capacity
The maximum amount that can be borrowed to reach target health:
_10MaxBorrow = EC / TargetHF
Derivation:
_10We want: HF = EC / ED = TargetHF_10Therefore: ED = EC / TargetHF
Example:
_10EC = $1250_10TargetHF = 1.3_10_10Max Borrow = 1250 / 1.3 = $961.54 MOET
Auto-Borrowing Mathematics
Initial Auto-Borrow Amount
When a user deposits collateral with pushToDrawDownSink=true, the system calculates the initial borrow amount:
_10BorrowAmount = (EC / TargetHF)
Step-by-step calculation:
- Calculate effective collateral:
_10 EC = A_collateral × P_collateral × CF_collateral
- Calculate target debt:
_10 ED_target = (EC / TargetHF)
- Borrow to reach target:
_10 Borrow = ED_target = (EC / TargetHF)
Complete example:
_15User deposits: 1000 FLOW_15FLOW price: $1.00_15Collateral factor: 0.8_15Target health: 1.3_15_15Step 1: EC = 1000 × 1.00 × 0.8 = $800_15_15Step 2: ED_target = 800 / 1.3 = $615.38_15_15Step 3: Borrow = $615.38 MOET_15_15Result:_15- Collateral: 1000 FLOW ($800 effective)_15- Debt: 615.38 MOET_15- Health: 800 / 615.38 = 1.30
Rebalancing Mathematics
Overcollateralized Rebalancing (HF > MaxHF)
When health exceeds maximum, calculate additional borrowing capacity:
_10AdditionalBorrow = (EC / TargetHF) - CurrentED
Proof:
_10Want: HF_new = TargetHF_10HF_new = EC / ED_new = TargetHF_10ED_new = EC / TargetHF_10_10Additional borrow = ED_new - CurrentED_10 = (EC / TargetHF) - CurrentED
Example:
_13Current state:_13- EC = $800_13- ED = $400_13- HF = 800 / 400 = 2.0 (> MaxHF of 1.5)_13_13Calculate additional borrow:_13ED_target = 800 / 1.3 = $615.38_13Additional = 615.38 - 400 = $215.38 MOET_13_13After borrowing $215.38:_13- EC = $800 (unchanged)_13- ED = $615.38_13- HF = 800 / 615.38 = 1.30
Undercollateralized Rebalancing (HF < MinHF)
When health falls below minimum, calculate required repayment:
_10RequiredRepayment = CurrentED - (EC / TargetHF)
Proof:
_10Want: HF_new = TargetHF_10HF_new = EC / ED_new = TargetHF_10ED_new = EC / TargetHF_10_10Required repayment = CurrentED - ED_new_10 = CurrentED - (EC / TargetHF)
Example:
_15Price drops! Collateral value decreases._15_15New state:_15- EC = $640 (was $800, FLOW dropped 20%)_15- ED = $615.38 (unchanged)_15- HF = 640 / 615.38 = 1.04 (< MinHF of 1.1)_15_15Calculate required repayment:_15ED_target = 640 / 1.3 = $492.31_15Repayment = 615.38 - 492.31 = $123.07 MOET_15_15After repaying $123.07:_15- EC = $640 (unchanged)_15- ED = $492.31_15- HF = 640 / 492.31 = 1.30
Interest Mathematics
Scaled Balance System
Instead of updating every position's balance when interest accrues, FCM stores a "scaled" version of each balance that remains constant over time. This scaled balance is the actual balance divided by a global interest index, allowing the protocol to track interest for thousands of positions with minimal gas costs.
_10ScaledBalance = \frac{TrueBalance}{I_t}
Where:
- $ScaledBalance$: Stored scaled balance
- $TrueBalance$: Actual balance including interest
- $I_t$: Current interest index
Key insight: Scaled balance stays constant while interest index grows.
Interest Index Growth
The interest index is a global multiplier that starts at 1.0 and grows over time based on the current interest rate. Every time the protocol updates, the index increases slightly, and this single update effectively compounds interest for all positions simultaneously.
_10I_t(n+1) = I_t(n) × (1 + r × \Delta t)
Where:
- $r$: Annual interest rate (e.g., 0.10 for 10%)
- $\Delta t$: Time elapsed (in years)
For compound interest:
_10I_t(n) = I_0 × e^{r × t}
Where $e$ is Euler's number (≈2.718).
True Balance Calculation
When you need to know the actual current balance of a position (including all accrued interest), you multiply the stored scaled balance by the current interest index. This calculation happens on-demand only when the position is accessed, not on every block.
_10TrueBalance(t) = ScaledBalance × I_t
Example:
_10Initial deposit: 1000 MOET_10Initial index: I_0 = 1.0_10Scaled balance: ScaledBalance = 1000 / 1.0 = 1000_10_10After 1 year at 10% APY:_10Interest index: I_1 = 1.0 × e^(0.10 × 1) ≈ 1.105_10True balance: TrueBalance = 1000 × 1.105 = 1105 MOET_10_10User's debt grew from 1000 to 1105 MOET (10.5% with compound interest)
Why Scaled Balances?
The scaled balance system is a gas optimization that makes FCM economically viable even with thousands of active positions. By storing balances in a scaled form and only updating a single global index, the protocol avoids the prohibitive cost of updating every position on every block.
Without scaled balances:
_10Every block (every ~2 seconds):_10- Update interest index_10- Iterate through ALL positions_10- Update each position's balance_10- Gas cost: O(n) where n = number of positions
With scaled balances:
_10Every block:_10- Update interest index only_10- Gas cost: O(1)_10_10When position is touched:_10- Calculate true balance: scaled × index_10- Gas cost: O(1) per position
Result: Massive gas savings for the protocol!
Liquidation Mathematics
Liquidation Trigger
A position becomes liquidatable when:
_10HF < 1.0
Equivalently:
_10EC < ED
Liquidation Target
Liquidations aim to restore health to a target (typically 1.05):
_10Target HF = 1.05
Collateral Seized Calculation
The amount of collateral to seize depends on the implementation approach used by the protocol.
Simplified Formula (used in basic examples and documentation):
_10CollateralSeized = (DebtRepaid × (1 + bonus)) / PriceCollateral
Where:
- $DebtRepaid$: Amount of debt repaid by liquidator (in MOET or debt token)
- $bonus$: Liquidation bonus (e.g., 0.05 for 5%)
- $PriceCollateral$: Market price of collateral token in MOET terms
Complete Formula (actual FCM implementation):
_10CollateralSeized = [(DebtRepaid × PriceDebt) / BorrowFactor] × (1 + bonus) / (PriceCollateral × CollateralFactor)
Where:
- $DebtRepaid$: Amount of debt repaid by liquidator
- $PriceDebt$: Oracle price of debt token (in MOET terms, typically 1.0 for MOET)
- $BorrowFactor$: Risk parameter for debt (typically 1.0)
- $bonus$: Liquidation bonus (e.g., 0.05 for 5%)
- $PriceCollateral$: Oracle price of collateral token (in MOET terms)
- $CollateralFactor$: Risk parameter for collateral (e.g., 0.8 for FLOW)
Why the difference? The simplified formula assumes debt price = 1.0, borrow factor = 1.0, and ignores the collateral factor in seizure (treating it as only affecting borrowing capacity). The complete formula properly accounts for all risk parameters and token prices as implemented in the actual protocol.
For MOET debt with typical parameters:
- $PriceDebt$ = 1.0 (MOET)
- $BorrowFactor$ = 1.0
- This simplifies the numerator to: $(DebtRepaid × 1.0)/ 1.0 = DebtRepaid$
The collateral factor appears in the denominator because it affects how much collateral value must be seized to repay the effective debt. Since effective collateral is calculated as $CollateralAmount × PriceCollateral × CollateralFactor$, seizing collateral to cover debt requires dividing by the CollateralFactor to get the actual token amount.
Example using simplified formula:
_22Liquidatable position:_22- Collateral: 1000 FLOW @ $0.60 = $600 total value_22- Effective collateral: $600 × 0.8 CF = $480_22- Debt: 650 MOET @ $1.00_22- HF = 480 / 650 = 0.738 < 1.0_22_22Partial liquidation using simplified formula:_22- Liquidator repays: 150 MOET_22- Liquidation bonus: 5%_22- Collateral seized = (150 × 1.05) / 0.60 = 262.5 FLOW_22- Value of seized collateral: 262.5 × $0.60 = $157.50_22_22After partial liquidation:_22- Remaining collateral: 1000 - 262.5 = 737.5 FLOW @ $0.60 = $442.50_22- Effective collateral: $442.50 × 0.8 = $354.00_22- Remaining debt: 650 - 150 = 500 MOET_22- New HF = 354.00 / 500 = 0.708 (still liquidatable)_22_22Liquidator's profit:_22- Paid: $150 (debt repayment)_22- Received: $157.50 worth of FLOW_22- Profit: $7.50 (5% bonus on $150)
Example using complete formula:
_32Same liquidatable position as above._32_32Partial liquidation using complete formula:_32- DebtRepaid: 150 MOET_32- PriceDebt: 1.0 (MOET)_32- BorrowFactor: 1.0_32- Liquidation bonus: 5% (0.05)_32- PriceCollateral: 0.60 (FLOW in MOET terms)_32- CollateralFactor: 0.8_32_32CollateralSeized = (150 × 1.0 / 1.0) × 1.05 / (0.60 × 0.8)_32 = 157.50 / 0.48_32 = 328.125 FLOW_32_32Value of seized collateral: 328.125 × $0.60 = $196.875_32_32After partial liquidation:_32- Remaining collateral: 1000 - 328.125 = 671.875 FLOW @ $0.60 = $403.125_32- Effective collateral: $403.125 × 0.8 = $322.50_32- Remaining debt: 650 - 150 = 500 MOET_32- New HF = 322.50 / 500 = 0.645 (still liquidatable, but lower than simplified)_32_32Liquidator's profit:_32- Paid: $150 (debt repayment)_32- Received: $196.875 worth of FLOW_32- Profit: $46.875 (31.25% effective bonus!)_32_32Note: The complete formula gives the liquidator significantly more collateral because_32it divides by the CollateralFactor. This compensates for the risk discount applied_32to the collateral. In practice, the actual FlowCreditMarket implementation uses the_32quoteLiquidation() function which calculates the exact amounts needed to reach the_32target health factor of 1.05.
Required Debt Repayment for Target Health
To restore a position to the target health factor (typically 1.05), we need to find how much debt to repay. This is complex because seizing collateral also reduces the effective collateral simultaneously.
Goal: Achieve a specific target health factor after liquidation:
_10HF_target = EC_after / ED_after
The challenge: Both EC and ED change during liquidation:
_10EC_after = EC_current - (Collateral Seized × Price × CF)_10ED_after = ED_current - Debt Repaid
Using the simplified seizure formula:
_10Collateral Seized = (Debt Repaid × (1 + bonus)) / Price
The effective collateral value seized is:
_10EC_seized = Collateral Seized × Price × CF_10 = [(Debt Repaid × (1 + bonus)) / Price] × Price × CF_10 = Debt Repaid × (1 + bonus) × CF
Substituting into the target health equation:
_10HF_target = [EC_current - Debt Repaid × (1 + bonus) × CF] / [ED_current - Debt Repaid]
Solving for Debt Repaid:
_10HF_target × (ED_current - Debt Repaid) = EC_current - Debt Repaid × (1 + bonus) × CF_10_10HF_target × ED_current - HF_target × Debt Repaid = EC_current - Debt Repaid × (1 + bonus) × CF_10_10HF_target × ED_current - EC_current = HF_target × Debt Repaid - Debt Repaid × (1 + bonus) × CF_10_10HF_target × ED_current - EC_current = Debt Repaid × [HF_target - (1 + bonus) × CF]
Final formula:
_10Debt Repaid = (HF_target × ED_current - EC_current) / [HF_target - (1 + bonus) × CF]
Working example:
_28Initial position (severely undercollateralized):_28- Collateral: 1000 FLOW @ $0.50 (price dropped significantly!)_28- EC = 1000 × 0.50 × 0.8 = $400_28- ED = 615.38 MOET_28- Current HF = 400 / 615.38 = 0.65 < 1.0 (liquidatable!)_28- Target HF = 1.05_28- Liquidation bonus = 5% (0.05)_28- Collateral Factor (CF) = 0.8_28_28Step 1: Calculate required debt repayment_28Debt Repaid = (1.05 × 615.38 - 400) / [1.05 - (1.05 × 0.8)]_28 = (646.15 - 400) / [1.05 - 0.84]_28 = 246.15 / 0.21_28 = 1,172.14 MOET_28_28This is more than the total debt! This means the position cannot be restored to HF = 1.05_28because there isn't enough collateral. This would be a full liquidation case._28_28Step 2: Calculate maximum achievable HF_28If all debt is repaid (615.38 MOET):_28Collateral seized = (615.38 × 1.05) / 0.50 = 1,292.30 FLOW_28But we only have 1000 FLOW, so this is a full liquidation._28_28In full liquidation:_28- All 1000 FLOW seized → value = $500_28- Effective value for liquidator = $500_28- Debt repaid = 500 / 1.05 = $476.19 MOET (limited by collateral available)_28- Remaining debt = 615.38 - 476.19 = $139.19 (bad debt for protocol)
Better example with partial liquidation: k
_26Initial position (moderately undercollateralized):_26- Collateral: 1000 FLOW @ $0.78_26- EC = 1000 × 0.78 × 0.8 = $624_26- ED = 650 MOET_26- Current HF = 624 / 650 = 0.96 < 1.0 (liquidatable)_26- Target HF = 1.05_26- Bonus = 5% (0.05)_26- CF = 0.8_26_26Step 1: Calculate debt repayment_26Debt Repaid = (1.05 × 650 - 624) / [1.05 - (1.05 × 0.8)]_26 = (682.5 - 624) / [1.05 - 0.84]_26 = 58.5 / 0.21_26 = 278.57 MOET_26_26Step 2: Verify the calculation_26Collateral seized = (278.57 × 1.05) / 0.78 = 375.33 FLOW_26EC seized = 375.33 × 0.78 × 0.8 = $234.21_26EC after = 624 - 234.21 = $389.79_26ED after = 650 - 278.57 = $371.43_26HF after = 389.79 / 371.43 = 1.049 ≈ 1.05 ✓_26_26Step 3: Liquidator's outcome_26Collateral received: 375.33 FLOW @ $0.78 = $292.76_26Debt repaid: $278.57_26Profit: $292.76 - $278.57 = $14.19 (5.09% return)
Key insights:
- The formula works when there's sufficient collateral to reach target HF
- When
Debt Repaid > ED_current, it indicates a full liquidation scenario - The denominator
[HF_target - (1 + bonus) × CF]is typically small (0.21 in this example), meaning small changes in EC/ED require large debt repayments - The liquidation becomes more efficient (smaller debt repayment needed) when the current HF is closer to the target HF
Price Impact Analysis
Health Factor Sensitivity to Price Changes
Given a percentage change in collateral price:
_10HF_new = HF_old × \frac{P_new}{P_old}
Derivation:
_10HF_old = EC_old / ED = (A × P_old × CF) / ED_10_10HF_new = EC_new / ED = (A × P_new × CF) / ED_10_10HF_new / HF_old = P_new / P_old_10_10Therefore: HF_new = HF_old × (P_new / P_old)
Example:
_10Initial: HF = 1.5, Price = $1.00_10_10Price drops 20% to $0.80:_10HF_new = 1.5 × (0.80 / 1.00) = 1.5 × 0.80 = 1.20_10_10Price drops 30% to $0.70:_10HF_new = 1.5 × (0.70 / 1.00) = 1.5 × 0.70 = 1.05 (approaching danger!)_10_10Price drops 35% to $0.65:_10HF_new = 1.5 × (0.65 / 1.00) = 1.5 × 0.65 = 0.975 < 1.0 (liquidatable!)
Maximum Safe Price Drop
What's the maximum price drop before liquidation?
_10MaxDropPercent = 1 - (1.0 / HF_current)
Derivation:
_10Want: HF_new = 1.0 (liquidation threshold)_10HF_new = HF_old × (P_new / P_old) = 1.0_10_10P_new / P_old = 1.0 / HF_old_10_10P_new = P_old / HF_old_10_10Drop = P_old - P_new = P_old × (1 - 1/HF_old)_10_10Drop % = 1 - 1/HF_old
Examples:
_10HF = 1.3: Max drop = 1 - 1/1.3 = 23.08%_10HF = 1.5: Max drop = 1 - 1/1.5 = 33.33%_10HF = 2.0: Max drop = 1 - 1/2.0 = 50.00%_10HF = 1.1: Max drop = 1 - 1/1.1 = 9.09% (very risky!)
Multi-Collateral Mathematics
Multiple Collateral Types
With multiple collateral types:
_10EC = ∑(A_i × P_i × CF_i)
Where the sum is taken over all n collateral token types.
Effective Collateral with Price Correlation
When collateral types are correlated (e.g., FLOW and stFLOW):
Simplified (no correlation):
_10Risk = \sum_i Risk_i
With correlation (advanced):
_10Risk = \sqrt{\sum_i\sum_j w_i w_j \sigma_i \sigma_j \rho_ij}
Where:
- $w_i$: Weight of asset $i$
- $\sigma_i$: Volatility of asset $i$
- $\rho_ij$: Correlation between assets $i$ and $j$
Practical impact:
_10Scenario 1: Uncorrelated collateral_10- 50% FLOW (volatile)_10- 50% USDC (stable)_10- Effective diversification_10_10Scenario 2: Correlated collateral_10- 50% FLOW (volatile)_10- 50% stFLOW (volatile, correlated with FLOW)_10- Limited diversification_10- Both can drop together!
Yield Calculations
Simple APY
Annual Percentage Yield without compounding:
_10APY_simple = ((FinalValue - InitialValue) / InitialValue) × (365 / Days)
Compound APY
With continuous compounding:
_10APY_compound = e^r - 1
Where $r$ is the continuous annual rate.
Leveraged Yield
When borrowing to increase yield exposure:
_10Yield_leveraged = Yield_strategy - Interest_borrowed
Example:
_13Deposit: $1000 collateral_13Borrow: $615 at 5% APY_13Deploy $615 to strategy earning 10% APY_13_13Costs:_13- Interest on borrowed: 615 × 0.05 = $30.75/year_13_13Returns:_13- Yield from strategy: 615 × 0.10 = $61.50/year_13_13Net leveraged yield: 61.50 - 30.75 = $30.75/year_13Effective APY on your $1000: 30.75 / 1000 = 3.075% extra_13Total return: Base yield + leveraged yield
Risk Metrics
Liquidation Risk Score
A simplified risk score:
_10\text{Risk Score} = (1 / HF - 1.0) × \text{Volatility Collateral}
Higher score = higher risk.
Value at Risk (VaR)
Maximum expected loss over time period at confidence level 95%:
_10VaR(95) = EC × σ × z(0.95)
Where:
- σ: Daily volatility of collateral
- z(0.95): Z-score for 95% confidence (≈1.645)
Example:
_10Collateral: $1000 FLOW_10Daily volatility: 5%_10Confidence: 95%_10_10VaR = 1000 × 0.05 × 1.645 = $82.25_10_10Interpretation: 95% confident that daily loss won't exceed $82.25
Validation & Safety Checks
Health Factor Bounds
All operations must satisfy:
_101.0 ≤ MinHF < TargetHF < MaxHF
Typical values: $MinHF = 1.1$, $TargetHF = 1.3$, $MaxHF = 1.5$
Collateral Factor Bounds
For safety:
_100 < CF_t ≤ 1.0
Typically:
- Volatile assets (FLOW): $CF = 0.75 - 0.85$
- Stable assets (USDC): $CF = 0.90 - 0.95$
- Liquid staking (stFLOW): $CF = 0.80 - 0.85$
Maximum Leverage
Maximum theoretical leverage:
_10MaxLeverage = \frac{1}{1 - CF}
Examples:
_10CF = 0.8: Max leverage = 1 / (1 - 0.8) = 5x_10CF = 0.75: Max leverage = 1 / (1 - 0.75) = 4x_10CF = 0.9: Max leverage = 1 / (1 - 0.9) = 10x (risky!)
But actual safe borrowing is constrained by target health:
Safe Debt Ratio
Maximum debt-to-collateral ratio while maintaining target health:
_10SafeDebtRatio = CF / TargetHF
Examples:
_10CF = 0.8, TargetHF = 1.3: Safe debt ratio = 0.8 / 1.3 ≈ 0.615_10CF = 0.75, TargetHF = 1.5: Safe debt ratio = 0.75 / 1.5 = 0.50
This means with CF = 0.8 and TargetHF = 1.3, you can safely borrow up to $0.615 for every $1 of collateral value.
Practical Examples
Complete Position Lifecycle Math
_36=== Initial Deposit ===_36Deposit: 1000 FLOW @ $1.00_36CF = 0.8, TargetHF = 1.3_36_36EC = 1000 × 1.00 × 0.8 = $800_36Borrow = 800 / 1.3 = $615.38 MOET_36HF = 800 / 615.38 = 1.30 ✓_36_36=== Price Drop 20% ===_36New price: $0.80_36EC = 1000 × 0.80 × 0.8 = $640_36ED = $615.38 (unchanged)_36HF = 640 / 615.38 = 1.04 < 1.1 ⚠️_36_36Rebalance needed:_36ED_target = 640 / 1.3 = $492.31_36Repay = 615.38 - 492.31 = $123.07_36_36After repayment:_36EC = $640, ED = $492.31_36HF = 640 / 492.31 = 1.30 ✓_36_36=== Price Recovery to $1.00 ===_36EC = 1000 × 1.00 × 0.8 = $800_36ED = $492.31_36HF = 800 / 492.31 = 1.625 > 1.5 ⚠️_36_36Rebalance needed:_36ED_target = 800 / 1.3 = $615.38_36Borrow = 615.38 - 492.31 = $123.07_36_36After borrowing:_36EC = $800, ED = $615.38_36HF = 800 / 615.38 = 1.30 ✓_36_36Position back to optimal state!
Next Steps
- Apply these formulas: ALP Documentation
- Understand architecture: FCM Architecture
- Learn the basics: Understanding FCM Basics