Prepare the inputs
Use the Stellar CLI and a funded signing account. Select the network and check its contract addresses. The example requires:
A market key is
{ hub_id, asset }. The same token in two hubs represents two
independent markets. See Markets for the model.
Supply collateral
SetCONTROLLER to the selected controller address. Set IDENTITY to your
configured CLI signing identity and CALLER_ADDRESS to its Stellar G... address.
Replace the token and amount placeholders. Pass account_id = 0 to create a
lending account.
Verify the position
SetACCOUNT_ID to the returned lending account id. Read its supplied amount
without sending a transaction:
1e18); values below 1e18 permit liquidation.
i128::MAX can mean no debt, a saturated ratio, or a missing account. Check
account_exists and debt positions before displaying it as debt-free.
Continue with Supply for supply constraints,
Borrow to add debt, or
System architecture for contract responsibilities.
