Skip to content
Logo

Stellar and Soroban

Lucent is not a direct Solidity port. It uses the Liquity v2 economic model while adapting implementation details to Stellar and Soroban.

Storage

Lucent uses explicit Soroban DataKey records rather than Solidity mappings.

Persistent storage covers Troves, deposits, snapshots, sorted nodes, surplus balances, and owner indexes. TTL is part of protocol operations, with restore and extend flows for contract code, contract instances, and important persistent storage.

Authorization

Soroban authorization replaces msg.sender assumptions. User actions require explicit Address::require_auth.

Delegate permissions are scoped to exact approved actions. For example, an interest-rate delegate can manage a borrower's rate but cannot redirect collateral or minted starUSD to another receiver.

Assets

XLM collateral moves through the native XLM Stellar Asset Contract.

starUSD is a Stellar issued asset exposed through its Stellar Asset Contract. The mint authority is controlled by StarUsdController, and users receive newly minted starUSD only through valid protocol flows.

The frontend must handle starUSD trustline onboarding and XLM reserve checks before users attempt transactions that receive starUSD.

Oracle

Lucent is expected to use an XLM/USD oracle from Reflector. XlmUsdPriceFeed reads the oracle price and enforces freshness checks, sanity bounds, fallback behavior, and shutdown rules if the price becomes stale or invalid.

Math and Resource Limits

Stellar assets use 7 decimal places. Lucent uses integer base units and deterministic rounding rules.

Dust handling must be defined for minting, repayment, redemption, liquidation, closing, and Stability Pool yield.

Redemptions, liquidations, sorted-list traversal, getters, and migration batches must be bounded to fit Soroban execution limits. SortedTroves may use a linked list, buckets, or another sorted index depending on profiling.

Shutdown

Oracle failure, stale pricing, or system collateral-ratio breach can trigger branch shutdown.

After shutdown, new debt and normal adjustments stop. Closes, liquidations, Stability Pool actions, and urgent redemptions remain available.