Skip to main content
Registry stores core addresses, trader-to-account membership, token aliases, asset metadata, token permissions, controller routes, controller TVL caps, and tracking metadata.

Discovery

Use get_protocol_config for batched core/token/protocol configuration; get_registered_assets, get_token_address_for, and get_lending_pool_for_symbol for market resolution; and get_tracking_meta for external-position valuation/unwind configuration. USDC price-feed aliases do not make distinct token contracts interchangeable. Account membership is written through AccountManager-authorized add_account, close_account, and update_account. There is no invented get_user_smart_account ABI: the frontend discovers account records using Registry storage and other supported fallbacks in MarginAccountService.

Governance

After finalize_registry_config, controller registration has a 48-hour queue delay. Token allowlist, asset metadata, and tracking metadata changes have a 24-hour queue delay. Before finalization, these queue methods apply configuration immediately as a bootstrap path. The queue methods accept proposed data; the corresponding apply methods consume the queued change after its deadline. Cancellation and immediate deregistration methods are available. Finalizing Registry configuration restricts subsequent changes to sensitive configuration. Admin succession uses proposal and acceptance. AssetMeta includes LTV and liquidation fields, but the current RiskEngine’s operative health threshold is a global 1.1. Do not infer per-asset weighted risk calculations solely from metadata fields. get_exec_gate batches target-to-controller lookup, probation TVL cap, and token permission checks. AccountManager’s current typed execution uses it directly.

Function signatures

These signatures are copied from the reviewed Rust implementation. env is supplied by Soroban and is not a transaction argument. Result errors and panics must be handled by the caller; simulation does not guarantee later execution. Public methods include privileged and internal-contract callbacks, not just user entrypoints.

__constructor

set_lendingpool_xlm

set_smart_account_hash

set_accountmanager_contract

set_lendingpool_usdc

set_risk_engine_address

set_rate_model_address

set_oracle_contract_address

set_native_xlm_contract_address

set_native_usdc_contract_address

set_blend_pool_address

set_tracking_token_contract_addr

set_aquarius_router_address

set_aquarius_pool_index

get_lendingpool_xlm

get_smart_account_hash

get_accountmanager_contract

get_lendingpool_usdc

get_risk_engine_address

get_rate_model_address

get_oracle_contract_address

get_xlm_contract_address

get_usdc_contract_address

get_blend_pool_address

get_aquarius_router_address

set_soroswap_router_address

get_soroswap_router_address

get_aquarius_pool_index

has_tracking_token_contract_addr

get_tracking_token_contract_addr

get_admin

propose_admin

accept_admin

get_proposed_admin

get_timelock_durations

upgrade

add_account

close_account

update_account

set_iscollateral_allowed

get_iscollateral_allowed

is_collateral_explicitly_revoked

set_controller_facade

get_controller_facade

has_controller_facade

is_registry_config_finalized

finalize_registry_config

queue_register_controller

register_controller

cancel_register_controller

deregister_controller

get_controller_for

get_controller_tvl_cap

get_protocol_config

get_revoked_flags

get_exec_gate

queue_set_token_allowed

set_token_allowed

cancel_set_token_allowed

deregister_token

is_token_allowed

queue_set_asset_meta

set_asset_meta

cancel_set_asset_meta

get_asset_meta

get_registered_assets

backfill_asset_list

get_token_address_for

get_price_feed_for

register_token_alias

get_lending_pool_for

get_lending_pool_for_symbol

queue_set_tracking_meta

set_tracking_meta

cancel_set_tracking_meta

deregister_tracking_meta

get_tracking_meta

get_blend_tracking_symbol_for

is_tracking_symbol

get_all_tracking_symbols

Source reference

  • Protocol_V1_Soroban_testnet/contracts/RegistryContract/src/registry.rs