Equation

Comprehensive Mathematical Formulations (with Arbitrage Prevention and All Conditions Integrated)

This final compilation presents all the key equations and conditions governing the Midgard ecosystem in one place, now including discussions about infinite loop scenarios and arbitrage prevention. It covers Bonding, Staking, Redemption, AI orchestration, Treasury logic, value streams (Penalty, Premium, Interest, Fees), LP considerations, and the critical conditions to prevent infinite issuance or arbitrage loops.

The system ensures MID always maintains at least $1 in intrinsic value (often surpassing it due to premiums and other yields) while avoiding conditions that would allow exploitable infinite loops or unchecked dilution.


1. Fundamental Value Constraints

Guaranteed Lower Bound (At Least $1): MID is always introduced with backing ≥ $1. Due to premiums, interest, and other surpluses, MID can exceed this $1 lower bound. Thus:

  • Minimum backing condition:

    CtreasuryNMID1\frac{C_{treasury}}{N_{MID}} \geq 1
  • With accumulated premiums and yields:

    CtreasuryNMID1+(Premium portion)\frac{C_{treasury}}{N_{MID}} \geq 1 + \text{(Premium portion)}

Here, “1 + Premium portion” indicates the token’s effective supported value can be above 1, reflecting treasury surplus.

No Dilutive Issuance Below 1 + Premium: When issuing new MID ((\Delta N)):

CtreasuryNMID+ΔN1+(Premium portion)\frac{C_{treasury}}{N_{MID} + \Delta N} \geq 1 + \text{(Premium portion)}

This ensures new MID issuance never reduces the per-token asset ratio below the guaranteed lower bound plus any accumulated premium.


2. Bonding Formulas

Bond Price ((B)): AI agents set the bond price considering target and current price conditions:

B=Bbase+α(PtargetPcurrent)B = B_{base} + \alpha (P_{target} - P_{current})
  • If ( B > 1 ): A premium ((B - 1)) is collected per MID.

  • If ( B < 1 ): A discount is offered, potentially attracting stable assets.

MID Received from Bonding: If a user deposits ( X ) units of a stable asset:

MID received=XB\text{MID received} = \frac{X}{B}

Discount Calculation for Bond Price

While we previously discussed the bond price ( B ) and its resulting premium when ( B > 1 ), we did not explicitly provide a formula for the discount scenario. A discount occurs when the bond price ( B ) is set below $1, allowing users to acquire MID at less than $1 worth of collateral per token.


Discount Rate from the Market Price

Definition: If we consider the current market price ( P_{current} ) as the reference, then a "discount" occurs when the bond price ( B ) is lower than ( P_{current} ). In other words, the user pays less than the going market rate for MID, thus gaining an advantage.

Formula for Discount Rate (DR):

Discount Rate=PcurrentBPcurrent,if B<Pcurrent.\text{Discount Rate} = \frac{P_{current} - B}{P_{current}}, \quad \text{if } B < P_{current}.
  • If ( B = P_{current} ), then (\text{Discount Rate} = 0%): The bond price is exactly the market price, offering neither a discount nor a premium.

  • If ( B > P_{current} ), then the bond is effectively at a premium; in that case, one could define a "negative discount" or simply call it a premium relative to ( P_{current} ).

By using ( P_{current} ) as the reference:

  • We avoid the need to let ( B < 1 ) to define a discount. Even if the policy is to keep ( B \geq 1 ), there can still be a discount scenario if the market price ( P_{current} ) is, say, $1.05 and ( B = 1.02 ). Here, the user gets a discount relative to the market price, even though ( B > 1 ).


Example

  • Suppose ( P_{current} = 1.05 ) USD per MID.

  • The AI sets ( B = 1.02 ).

Since ( B < P_{current} ), we have a discount:

Discount Rate=1.051.021.050.02857 or 2.86%\text{Discount Rate} = \frac{1.05 - 1.02}{1.05} \approx 0.02857 \text{ or } 2.86\%

This means users acquire MID at approximately 2.86% below the current market price, incentivizing them to bond and supply stable assets to the treasury without ever going below $1.


Integrating This into the Overall System

  • The system never sets ( B < 1 ) to avoid infinite loop scenarios and arbitrage issues based on a $1 baseline.

  • However, by referencing ( P_{current} ), we can still offer a discount scenario whenever ( B < P_{current} ). This provides the necessary flexibility for AI agents to attract capital without creating conditions for infinite arbitrage at below-$1 pricing.

  • The logic that no issuance occurs below "1 + Premium" still applies for ensuring intrinsic value. The difference now is that “discount” is always measured relative to ( P_{current} ), not absolute $1.

Thus, using ( P_{current} ) as the reference for discount rate resolves the conflict of needing ( B < 1 ) and allows for rational, safe discount offerings in the bonding mechanism.


Total Premium: Summed over all bonds where (B > 1):

Total Premium=(B1)×(MID issued)\text{Total Premium} = \sum (B - 1) \times (\text{MID issued})

3. Staking and Reward Backing

Staking Reward Constraint: Rewards must never exceed treasury’s available surplus resources:

Staking RewardsPremiums+Interest+Fees+Penalties\text{Staking Rewards} \leq \text{Premiums} + \text{Interest} + \text{Fees} + \text{Penalties}

This ensures all rewards have tangible backing.

APY Calculation (Weighted Aggregation): If multiple AI agents propose APY values ( R_{A_i} ) with weights ( w_i ):

Rfinal=iwiRAiiwiR_{final} = \frac{\sum_i w_i R_{A_i}}{\sum_i w_i}

APY is thus balanced and never inflationary beyond the treasury’s capability.


4. Redemption Formulas (Vesting and Penalty)

Penalty for Early Redemption: A linear example:

P(t)=p0(1tT)P(t) = p_0 \left(1 - \frac{t}{T}\right)
  • ( T ): Vesting period (e.g., 7 days)

  • ( t ): Time waited before redeeming sMID to MID

  • ( p_0 ): Maximum penalty rate at ( t=0 )

MID Received on Redemption:

MIDreceived=sMIDowned×(1P(t))MID_{received} = sMID_{owned} \times (1 - P(t))

No penalty if ( t=T ). Penalties collected enhance treasury value.


5. Treasury and Value Streams

At-Least-$1 and Premium Support: Already stated:

CtreasuryNMID1+(Premium portion)\frac{C_{treasury}}{N_{MID}} \geq 1 + \text{(Premium portion)}

and no issuance that violates:

CtreasuryNMID+ΔN1+(Premium portion)\frac{C_{treasury}}{N_{MID} + \Delta N} \geq 1 + \text{(Premium portion)}

Value Streams into Treasury:

  • Premiums: From Bonding if ( B > 1 ).

  • Interest: From interest-bearing assets.

  • Fees: From providing liquidity (LP fees).

  • Penalties: From early sMID redemption.

These all bolster the treasury, ensuring stable or premium-backed value for MID.


6. Buybacks and Supply Adjustments

Price-Based Supply Change: If (P_{current}) deviates from (P_{target}):

ΔN=k3(PcurrentPtarget)\Delta N = k_3 (P_{current} - P_{target})
  • If ( P_{current} < 1 ): (\Delta N < 0), indicating buybacks to reduce supply and push price back ≥ 1.

  • If ( P_{current} > 1 ): (\Delta N) can be positive or stable, allowing redistribution of surplus value or moderate supply expansions.

No Direct Arbitrage by Buybacks: Buybacks are proportionate and rational, guided by AI to restore or maintain desired conditions.


7. Providing Liquidity (LP) and Risk-Free Value

When treasury pairs MID with stable assets in a DEX pool, the minimal “risk-free” value is approximated by the geometric mean:

Risk-Free Approximation (RFA)2AM\text{Risk-Free Approximation (RFA)} \approx 2 \sqrt{A \cdot M}
  • ( A ): amount of stable asset

  • ( M ): amount of MID tokens in the LP

Since all MID is at least $1 backed, placing MID into LP does not risk dropping below the guaranteed lower bound. MID locked in LP by the treasury is not counted as circulating supply, preventing dilution and infinite loops.


8. AI Orchestration Formulas

Weighted Aggregation of Proposals: For a parameter ( X ):

Xfinal=iwiXAiiwiX_{final} = \frac{\sum_i w_i X_{A_i}}{\sum_i w_i}

Constrained Optimization: If initial results conflict with constraints (like maintaining at-least-$1+premium$ value per MID):

minB,R,IiwiΘAi(B,R,I)subject togj(B,R,I)0\min_{B,R,I} \sum_i w_i \| \Theta_{A_i} - (B,R,I)\| \quad \text{subject to} \quad g_j(B,R,I)\leq0

where ( g_j ) ensure no violation of key economic invariants.


9. Preventing Infinite Arbitrage and Ensuring No Underpriced Bonds

Condition Against Infinite Arbitrage: To avoid scenarios where users repeatedly buy cheap MID via Bonding and resell at a higher stable-backed price, the bond price must not fall below the treasury’s risk-free value per MID. In other words:

Let:

Risk-Free Value per MID=Ctreasury,riskfreeNMID\text{Risk-Free Value per MID} = \frac{C_{treasury, risk-free}}{N_{MID}}

We must have:

BCtreasury,riskfreeNMIDB \geq \frac{C_{treasury, risk-free}}{N_{MID}}

If bond price ( B ) is lower than this ratio, users could exploit a loop:

  1. Acquire MID at a Bond Price below intrinsic backing.

  2. Sell MID at near $1 or above $1+premium in the market (since the market recognizes the treasury backing).

  3. Repeat and siphon value from the treasury indefinitely.

By enforcing:

BCtreasury,riskfreeNMIDB \geq \frac{C_{treasury, risk-free}}{N_{MID}}

no user can buy MID cheaper than the actual per-token backing, preventing infinite arbitrage loops.

No Direct Stable Redemption: Since there is no direct stable-asset redemption, users must rely on market liquidity (possibly from the treasury’s LP provisioning) to swap MID back to stable assets. This indirect route ensures that if bond prices dip too low, the AI agents can stop issuance or adjust parameters, restoring proper alignment. Thus, this condition prevents any incentive for infinite issuance at a discount that would break the system.


Summary of Key Conditions

  1. Maintaining ≥ $1 + Premium (If Any):

    • Per-token backing always ≥ $1 + premium portion.

    • No new issuance if it would drop backing below that threshold.

  2. Bond Price ≥ Risk-Free Value per MID:

    • Ensures no infinite loop of cheap MID issuance and arbitrage.

    • Prevents extracting treasury value via discounted bonding.

  3. Proper Staking Rewards Backing:

    • Staking rewards ≤ Premiums + Interest + Fees + Penalties.

  4. Redemption Penalty and Vesting:

    • Discourages instant flips, flash loan exploits.

    • Gives AI agents time to adjust parameters.

  5. LP Provision and Geometric Mean Consideration:

    • LP-held MID is not circulating, no dilution occurs.

    • MID’s $1+ backed issuance ensures LP positions remain safe and don’t break the lower bound.

  6. AI Orchestration:

    • Weighted averages and constrained optimization to finalize B, R, and I parameters.

    • Ensures adaptive, data-driven, and rational adjustments under all market conditions.

By integrating all these formulas and conditions, the Midgard ecosystem achieves a robust, infinitely adaptative environment where MID is secure, stable, well-backed at all times, and no infinite exploitative scenario can occur. The conditions form a tight logical framework, allowing MID’s price and incentives to remain coherent, attractive, and firmly grounded in tangible economic value.

Last updated