Skip to main content
A lending request updates account positions in the controller and market accounting in the pool. These calls and their token transfers form one atomic Soroban transaction. A failed check reverts every change. For a wallet integration, first read positions and assets from the v1 API. Build unsigned XDR with the SDK, prepare it through RPC, then ask the wallet to sign. A submitted hash is not a completed operation: wait for ledger SUCCESS before refreshing indexed data. The wallet guide includes recovery after an uncertain submission.

Request lifecycle

  1. The controller authenticates the caller and checks account authority where required. It applies the operation’s global pause, spoke listing, and position rules.
  2. The pool accrues interest for the affected markets, then updates cash and scaled supply or debt balances. Inbound token credit uses measured receipts.
  3. The controller applies the returned position changes and checks spoke caps and account risk where required.
  4. Successful mutations publish account and market events. Indexers consume both the controller and pool event streams.
Some checks occur after token transfers. A failed cap or solvency check still rolls back the transfer. Intermediate state is not a completed operation.

Lending operations

Global pause and spoke halt flags have different scopes. The Risk parameters page defines which operations remain available.

External execution

Strategies forward opaque route bytes to the swap aggregator. The controller measures input and output balance changes and checks the final account state. Slippage constraints belong to the route and are enforced by the aggregator; a positive output alone does not establish an acceptable execution price. See Strategies. Flash loans transfer tokens to a receiver, run its callback, pull repayment, and verify the final pool balance. The fee becomes protocol revenue. See Flash loans.

Validation responsibilities

The pool does not track spokes or decide whether an individual account is healthy. See the Security model for the trust assumptions behind these checks and Events for indexing.