Synths - Self-Repaying Synthetic Assets Standard
Self-repaying synthetic asset protocol enabling users to mint x* tokens against yield-bearing collateral
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
| Synth | Name | Collateral | Description |
|---|---|---|---|
| xLUX | Lux Synthetic LUX | WLUX/sLUX | Native Lux gas token synthetic |
| xAI | Lux Synthetic AI | AI/sAI | GPU compute mining token synthetic |
| xZOO | Lux Synthetic ZOO | LZOO | Zoo ecosystem token synthetic |
Major L1 Chains
| Synth | Name | Collateral | Description |
|---|---|---|---|
| xETH | Lux Synthetic ETH | LETH | Ethereum synthetic |
| xBTC | Lux Synthetic BTC | LBTC | Bitcoin synthetic |
| xSOL | Lux Synthetic SOL | LSOL | Solana synthetic |
| xTON | Lux Synthetic TON | LTON | TON synthetic |
| xADA | Lux Synthetic ADA | LADA | Cardano synthetic |
| xAVAX | Lux Synthetic AVAX | LAVAX | Synthetic of external Avalanche AVAX |
| xBNB | Lux Synthetic BNB | LBNB | BNB Chain synthetic |
| xPOL | Lux Synthetic POL | LPOL | Polygon synthetic |
Stablecoins
| Synth | Name | Collateral | Description |
|---|---|---|---|
| xUSD | Lux Synthetic USD | LUSD | USD 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:
- Active debt management to avoid liquidation
- Interest payments that compound over time
- Constant monitoring of collateralization ratios
- Risk of total collateral loss during market volatility
Self-repaying synths solve these problems by:
- Zero Liquidation Risk: Debt is always backed by yield-bearing collateral at or above 1:1
- Passive Repayment: Yield automatically reduces debt without user intervention
- Capital Efficiency: Access future yield immediately without selling assets
- Predictable Outcomes: Known maximum debt duration based on yield rates
Lux-Specific Benefits
- Native Token Integration: Mint xLUX against staked LUX, xAI against staked AI
- Cross-Chain Synthetics: All x* tokens portable across Lux chains via Warp messaging
- High-Performance Settlement: Sub-second finality for transmuter operations
- Post-Quantum Ready: Future migration path for synthetic token signatures
Specification
Core Contracts
| Contract | Purpose | Location |
|---|---|---|
AlchemistV2.sol | Main vault - deposit, mint, repay, liquidate | contracts/synths/AlchemistV2.sol |
TransmuterV2.sol | 1:1 synth-to-underlying redemption queue | contracts/synths/TransmuterV2.sol |
TransmuterBuffer.sol | Buffer between Alchemist and Transmuter | contracts/synths/TransmuterBuffer.sol |
SynthToken.sol | Base ERC20 for synths (ERC-3156 flash loans) | contracts/synths/SynthToken.sol |
Synth Token Contracts
| Token | Contract | Flash Fee |
|---|---|---|
| xUSD | contracts/synths/xUSD.sol | 0.1% |
| xETH | contracts/synths/xETH.sol | 0.1% |
| xBTC | contracts/synths/xBTC.sol | 0.1% |
| xLUX | contracts/synths/xLUX.sol | 0.1% |
| xAI | contracts/synths/xAI.sol | 0.1% |
| xSOL | contracts/synths/xSOL.sol | 0.1% |
| xTON | contracts/synths/xTON.sol | 0.1% |
| xADA | contracts/synths/xADA.sol | 0.1% |
| xAVAX | contracts/synths/xAVAX.sol | 0.1% |
| xBNB | contracts/synths/xBNB.sol | 0.1% |
| xPOL | contracts/synths/xPOL.sol | 0.1% |
| xZOO | contracts/synths/xZOO.sol | 0.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
| Parameter | Value | Description |
|---|---|---|
minimumCollateralization | 200% (2e18) | Minimum collateral ratio |
protocolFee | 10% (1000 BPS) | Fee on harvested yield |
flashFee | 0.1% (10 BPS) | Flash loan fee |
BPS | 10000 | Basis points constant |
FIXED_POINT_SCALAR | 1e18 | Fixed-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 Pair | Trading Pair | Purpose |
|---|---|---|
| WLUX/xLUX | WLUX/LUSD | LUX synth arbitrage |
| LETH/xETH | LETH/LUSD | ETH synth arbitrage |
| LBTC/xBTC | LBTC/LUSD | BTC synth arbitrage |
| LUSD/xUSD | - | USD synth arbitrage |
| AI/xAI | AI/LUSD | AI synth arbitrage |
| LSOL/xSOL | LSOL/LUSD | SOL synth arbitrage |
| LTON/xTON | LTON/LUSD | TON synth arbitrage |
| LADA/xADA | LADA/LUSD | ADA synth arbitrage |
| LAVAX/xAVAX | LAVAX/LUSD | AVAX synth arbitrage (external asset) |
| LBNB/xBNB | LBNB/LUSD | BNB synth arbitrage |
| LPOL/xPOL | LPOL/LUSD | POL synth arbitrage |
| LZOO/xZOO | LZOO/LUSD | ZOO 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
| Operation | Gas Cost | USD (@ 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:
- Known security properties
- Reduced development time
- Familiar UX for DeFi users
- 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
-
Yield Source Risk: If a yield source fails or is exploited, collateral may be lost
- Mitigation: Multiple yield sources, maximum exposure limits per source
-
Oracle Risk: Incorrect price feeds could enable undercollateralized minting
- Mitigation: Multiple price sources, sanity checks, circuit breakers
-
Flash Loan Attacks: Flash mints could manipulate protocol state
- Mitigation: Reentrancy guards, state checks after external calls
-
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.
Related Standards
| LP | Title | Relationship |
|---|---|---|
| LP-3000 | Standard Library Registry | Master registry |
| LP-3001 | DeFi Protocol Integrations | External protocol adapters |
| LP-3020 | LRC-20 Token Standard | Base token interface |
| LP-3156 | LRC-3156 Flash Loans | Flash mint capability |
| LP-6022 | Warp Messaging 2.0 | Cross-chain synthetics |
| LP-9072 | Bridged Asset Standard | Bridge token pattern |
References
- Alchemix V2 Documentation
- Alchemix V2 GitHub
- Alchemix Audits
- Lux Standard Repository:
~/work/lux/standard/contracts/synths/
Copyright
Copyright and related rights waived via BSD-3-Clause.