user_create_marginif the PDA has no data.user_deposit_collateralfor each mint.user_open_debt_positionthenuser_borrow, oruser_deposit_and_borrow.- Attach every active vault, debt, price update, and Lite account on withdraw, borrow, swap, Lite, and liquidate.
buildRemainingPositionMetas in lib/margin-utils.ts. If you omit a debt, the program should reject — do not “optimize” the list.
Health preview belongs on the client. The chain is the source of truth.
