LPsLux Proposals
EVM & Execution
LP-3003

Synths - Self-Repaying Synthetic Assets Standard

Final

Self-repaying synthetic asset protocol enabling users to mint x* tokens against yield-bearing collateral

Category
LRC
Created
2025-12-14

Abstract

This LP defines the Synths Protocol for Lux Network - a self-repaying synthetic asset system forked and adapted from Alchemix Finance V2. The protocol enables users to deposit yield-bearing collateral and mint synthetic tokens (x* prefix) representing future yield. Loans repay themselves automatically through yield generated by deposited collateral. Unlike traditional lending, users face no liquidation risk as debt is always fully collateralized.

Mainnet Launch: 12 Synthetic Assets

The following 12 synthetic assets are approved for Lux Mainnet launch:

Native Lux Tokens

SynthNameCollateralDescription
xLUXLux Synthetic LUXWLUX/sLUXNative Lux gas token synthetic
xAILux Synthetic AIAI/sAIGPU compute mining token synthetic
xZOOLux Synthetic ZOOLZOOZoo ecosystem token synthetic

Major L1 Chains

SynthNameCollateralDescription
xETHLux Synthetic ETHLETHEthereum synthetic
xBTCLux Synthetic BTCLBTCBitcoin synthetic
xSOLLux Synthetic SOLLSOLSolana synthetic
xTONLux Synthetic TONLTONTON synthetic
xADALux Synthetic ADALADACardano synthetic
xAVAXLux Synthetic AVAXLAVAXSynthetic of external Avalanche AVAX
xBNBLux Synthetic BNBLBNBBNB Chain synthetic
xPOLLux Synthetic POLLPOLPolygon synthetic

Stablecoins

SynthNameCollateralDescription
xUSDLux Synthetic USDLUSDUSD stablecoin synthetic

Token Naming Convention

  • x prefix*: Synthetic tokens (e.g., xUSD, xETH, xBTC)
  • L prefix*: Bridge tokens on Lux (e.g., LETH, LBTC, LUSD)
  • Z prefix*: Bridge tokens on Zoo (e.g., ZETH, ZBTC, ZUSD)

Important: LUSD is the native Lux stablecoin, NOT USDC.

Motivation

Traditional DeFi lending protocols require:

  1. Active debt management to avoid liquidation
  2. Interest payments that compound over time
  3. Constant monitoring of collateralization ratios
  4. Risk of total collateral loss during market volatility

Self-repaying synths solve these problems by:

  1. Zero Liquidation Risk: Debt is always backed by yield-bearing collateral at or above 1:1
  2. Passive Repayment: Yield automatically reduces debt without user intervention
  3. Capital Efficiency: Access future yield immediately without selling assets
  4. Predictable Outcomes: Known maximum debt duration based on yield rates

Lux-Specific Benefits

  1. Native Token Integration: Mint xLUX against staked LUX, xAI against staked AI
  2. Cross-Chain Synthetics: All x* tokens portable across Lux chains via Warp messaging
  3. High-Performance Settlement: Sub-second finality for transmuter operations
  4. Post-Quantum Ready: Future migration path for synthetic token signatures

Specification

Core Contracts

ContractPurposeLocation
AlchemistV2.solMain vault - deposit, mint, repay, liquidatecontracts/synths/AlchemistV2.sol
TransmuterV2.sol1:1 synth-to-underlying redemption queuecontracts/synths/TransmuterV2.sol
TransmuterBuffer.solBuffer between Alchemist and Transmutercontracts/synths/TransmuterBuffer.sol
SynthToken.solBase ERC20 for synths (ERC-3156 flash loans)contracts/synths/SynthToken.sol

Synth Token Contracts

TokenContractFlash Fee
xUSDcontracts/synths/xUSD.sol0.1%
xETHcontracts/synths/xETH.sol0.1%
xBTCcontracts/synths/xBTC.sol0.1%
xLUXcontracts/synths/xLUX.sol0.1%
xAIcontracts/synths/xAI.sol0.1%
xSOLcontracts/synths/xSOL.sol0.1%
xTONcontracts/synths/xTON.sol0.1%
xADAcontracts/synths/xADA.sol0.1%
xAVAXcontracts/synths/xAVAX.sol0.1%
xBNBcontracts/synths/xBNB.sol0.1%
xPOLcontracts/synths/xPOL.sol0.1%
xZOOcontracts/synths/xZOO.sol0.1%

Synth Token Interface

// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.24;

import {SynthToken} from "./SynthToken.sol";

/// @title xUSD - Lux Synthetic USD
/// @notice Self-repaying synthetic USD backed by yield-bearing LUSD
contract xUSD is SynthToken {
    uint256 constant FLASH_FEE = 10; // 0.1% flash loan fee

    constructor() SynthToken("Lux Synthetic USD", "xUSD", FLASH_FEE) {}
}

AlchemistV2 Interface

interface IAlchemistV2 {
    // Version
    function version() external view returns (string memory);  // "2.2.7"

    // Immutables
    function debtToken() external view returns (address);       // xUSD/xETH/xLUX

    // Configuration
    function minimumCollateralization() external view returns (uint256);  // 2e18 = 200%
    function protocolFee() external view returns (uint256);               // Basis points

    // Core Operations
    function deposit(address yieldToken, uint256 amount, address recipient)
        external returns (uint256 shares);

    function depositUnderlying(
        address yieldToken,
        uint256 amount,
        address recipient,
        uint256 minimumAmountOut
    ) external returns (uint256 shares);

    function withdraw(address yieldToken, uint256 shares, address recipient)
        external returns (uint256 amount);

    function mint(uint256 amount, address recipient) external;

    function burn(uint256 amount, address recipient) external returns (uint256);

    function repay(address underlyingToken, uint256 amount, address recipient)
        external returns (uint256);

    function liquidate(address yieldToken, uint256 shares, uint256 minimumAmountOut)
        external returns (uint256);

    function harvest(address yieldToken, uint256 minimumAmountOut) external;

    // Account State
    function accounts(address owner) external view returns (int256 debt, address[] memory depositedTokens);
    function positions(address owner, address yieldToken) external view returns (uint256 shares, uint256 lastAccruedWeight);
}

TransmuterV2 Interface

interface ITransmuterV2 {
    function version() external view returns (string memory);  // "2.2.0"

    // Synthetic token operations
    function deposit(uint256 amount, address owner) external;
    function withdraw(uint256 amount, address recipient) external;
    function claim(uint256 amount, address recipient) external;

    // Exchange mechanism
    function exchange(uint256 amount) external;

    // View functions
    function getUnexchangedBalance(address owner) external view returns (uint256);
    function getExchangedBalance(address owner) external view returns (uint256);
    function getClaimableBalance(address owner) external view returns (uint256);

    // Token addresses
    function syntheticToken() external view returns (address);
    function underlyingToken() external view returns (address);
}

Protocol Parameters

ParameterValueDescription
minimumCollateralization200% (2e18)Minimum collateral ratio
protocolFee10% (1000 BPS)Fee on harvested yield
flashFee0.1% (10 BPS)Flash loan fee
BPS10000Basis points constant
FIXED_POINT_SCALAR1e18Fixed-point precision

Architecture

Self-Repaying Flow

┌─────────────────────────────────────────────────────────────────────────────┐
│                        SYNTHS PROTOCOL FLOW                                 │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  ┌─────────────┐     ┌─────────────┐     ┌─────────────┐     ┌───────────┐ │
│  │   DEPOSIT   │────>│  GENERATE   │────>│    YIELD    │────>│   REPAY   │ │
│  │  Collateral │     │   Synths    │     │   Accrues   │     │   Auto    │ │
│  └─────────────┘     └─────────────┘     └─────────────┘     └───────────┘ │
│         │                  │                    │                   │       │
│         ▼                  ▼                    ▼                   ▼       │
│  ┌─────────────┐     ┌─────────────┐     ┌─────────────┐     ┌───────────┐ │
│  │ YieldToken  │     │  xUSD/xETH  │     │  Strategy   │     │ Transmuter│ │
│  │ (yvWETH,    │     │  Minted     │     │  Returns    │     │ 1:1 Redeem│ │
│  │  aWETH)     │     │             │     │             │     │           │ │
│  └─────────────┘     └─────────────┘     └─────────────┘     └───────────┘ │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Collateral Flow

User Collateral Flow:
+----------+    deposit    +------------+    wrap    +---------------+
| User     | ------------> | Alchemist  | --------> | Yield Token   |
| (LUSD)   |               | V2         |           | (yvLUSD)      |
+----------+               +------------+           +---------------+
                               |                          |
                               | mint xUSD                | yield accrues
                               v                          v
                         +------------+           +---------------+
                         | xUSD       |           | Harvest       |
                         | Token      | <-------- | (keeper)      |
                         +------------+           +---------------+
                               |                          |
                               | credit distributed       |
                               v                          v
                         +------------+           +---------------+
                         | User Debt  |           | Transmuter    |
                         | Decreases  | --------> | Buffer        |
                         +------------+           +---------------+

LP Pair Integration

For each synth, corresponding LP pairs enable arbitrage when synths depeg:

Synth PairTrading PairPurpose
WLUX/xLUXWLUX/LUSDLUX synth arbitrage
LETH/xETHLETH/LUSDETH synth arbitrage
LBTC/xBTCLBTC/LUSDBTC synth arbitrage
LUSD/xUSD-USD synth arbitrage
AI/xAIAI/LUSDAI synth arbitrage
LSOL/xSOLLSOL/LUSDSOL synth arbitrage
LTON/xTONLTON/LUSDTON synth arbitrage
LADA/xADALADA/LUSDADA synth arbitrage
LAVAX/xAVAXLAVAX/LUSDAVAX synth arbitrage (external asset)
LBNB/xBNBLBNB/LUSDBNB synth arbitrage
LPOL/xPOLLPOL/LUSDPOL synth arbitrage
LZOO/xZOOLZOO/LUSDZOO synth arbitrage

Reference Implementation

Standard Library Location

All synth contracts are implemented in the Lux Standard Library:

~/work/lux/standard/contracts/synths/
├── AlchemistV2.sol
├── TransmuterV2.sol
├── TransmuterBuffer.sol
├── SynthToken.sol
├── SynthVault.sol
├── WETHGateway.sol
├── xUSD.sol
├── xETH.sol
├── xBTC.sol
├── xLUX.sol
├── xAI.sol
├── xSOL.sol
├── xTON.sol
├── xADA.sol
├── xAVAX.sol
├── xBNB.sol
├── xPOL.sol
├── xZOO.sol
├── adapters/
│   └── yearn/
├── base/
├── interfaces/
│   ├── alchemist/
│   ├── external/
│   └── transmuter/
├── libraries/
└── utils/

Gas Costs

OperationGas CostUSD (@ 25 gwei)
deposit~150,000$0.04
depositUnderlying~200,000$0.05
withdraw~120,000$0.03
mint~100,000$0.025
burn~80,000$0.02
repay~150,000$0.04
harvest~300,000$0.075
transmuter.claim~100,000$0.025

Test Cases

1. Basic Deposit and Mint

function testDepositAndMint() public {
    // Setup: User has 1000 LUSD
    uint256 depositAmount = 1000e18;
    lusd.approve(address(alchemist), depositAmount);

    // Deposit underlying (LUSD -> yvLUSD)
    uint256 shares = alchemist.depositUnderlying(
        yvLUSD,
        depositAmount,
        address(this),
        depositAmount * 99 / 100  // 1% slippage
    );

    // Mint xUSD (up to 50% of deposit value)
    uint256 mintAmount = 500e18;  // 500 xUSD
    alchemist.mint(mintAmount, address(this));

    // Verify state
    (int256 debt,) = alchemist.accounts(address(this));
    assertEq(debt, int256(mintAmount));
    assertEq(xUSD.balanceOf(address(this)), mintAmount);
}

2. Self-Repaying Loan

function testSelfRepayingLoan() public {
    // Setup: Deposit and mint
    testDepositAndMint();

    // Simulate yield accrual
    vm.roll(block.number + 1000);

    // Harvest yield
    alchemist.harvest(yvLUSD, 0);

    // Verify debt decreased
    (int256 debtAfter,) = alchemist.accounts(address(this));
    assertLt(debtAfter, 500e18);  // Debt reduced by harvested yield
}

3. Transmuter Exchange

function testTransmuterExchange() public {
    // Setup: User has xUSD, wants LUSD
    uint256 depositAmount = 1000e18;
    xUSD.approve(address(transmuter), depositAmount);

    // Deposit to transmuter queue
    transmuter.deposit(depositAmount, address(this));

    // Simulate repayments filling transmuter
    vm.prank(alchemistAddress);
    lusd.transfer(address(transmuter), depositAmount);
    transmuter.exchange(depositAmount);

    // Claim underlying
    uint256 claimable = transmuter.getClaimableBalance(address(this));
    transmuter.claim(claimable, address(this));

    // Verify received LUSD
    assertEq(lusd.balanceOf(address(this)), claimable);
}

Rationale

Why Fork Alchemix V2?

Alchemix V2 is a battle-tested protocol with:

  • Over $500M TVL at peak
  • Multiple security audits
  • Proven self-repaying loan mechanics
  • Modular yield strategy system

Forking and adapting for Lux provides:

  1. Known security properties
  2. Reduced development time
  3. Familiar UX for DeFi users
  4. Extensible architecture for Lux-specific features

Why x* Prefix?

The x prefix clearly identifies synthetic assets:

  • x = cross-collateralized / synthetic
  • Distinguishes from L* bridge tokens and native assets
  • Consistent with industry naming (xSUSHI, xALCX)

Why 200% Collateralization?

The 2:1 collateral ratio ensures:

  • Sufficient buffer for yield strategy risk
  • Protection against temporary yield source issues
  • Conservative approach for launch

Backwards Compatibility

This LP introduces new synthetic tokens and protocol contracts. There are no backwards compatibility concerns as:

  • New Tokens: All x* tokens are new deployments
  • No Token Migration: Users opt-in by depositing collateral
  • Bridge Tokens Unchanged: L* tokens continue to function as before
  • Existing DeFi: Compatible with standard ERC-20 interfaces

The protocol is additive and does not modify existing contracts.


Security Considerations

Smart Contract Risks

  1. Yield Source Risk: If a yield source fails or is exploited, collateral may be lost

    • Mitigation: Multiple yield sources, maximum exposure limits per source
  2. Oracle Risk: Incorrect price feeds could enable undercollateralized minting

    • Mitigation: Multiple price sources, sanity checks, circuit breakers
  3. Flash Loan Attacks: Flash mints could manipulate protocol state

    • Mitigation: Reentrancy guards, state checks after external calls
  4. Admin Key Risk: Admin functions could be abused

    • Mitigation: Timelock, multisig, eventual governance decentralization

Bridge Token Security

All bridge tokens (L* prefix) are secured with onlyAdmin modifier controlled by MPC oracle:

contract LRC20B is LRC20, Ownable, AccessControl {
    modifier onlyAdmin() {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "LRC20B: caller is not admin");
        _;
    }

    function bridgeMint(address account, uint256 amount) public onlyAdmin returns (bool);
    function bridgeBurn(address account, uint256 amount) public onlyAdmin returns (bool);
}

Only the MPC wallet can mint/burn bridge tokens - not arbitrary users.

LPTitleRelationship
LP-3000Standard Library RegistryMaster registry
LP-3001DeFi Protocol IntegrationsExternal protocol adapters
LP-3020LRC-20 Token StandardBase token interface
LP-3156LRC-3156 Flash LoansFlash mint capability
LP-6022Warp Messaging 2.0Cross-chain synthetics
LP-9072Bridged Asset StandardBridge token pattern

References

  1. Alchemix V2 Documentation
  2. Alchemix V2 GitHub
  3. Alchemix Audits
  4. Lux Standard Repository: ~/work/lux/standard/contracts/synths/

Copyright and related rights waived via BSD-3-Clause.