Skip to content

Operator methods

Sonnar acts on positions through a small set of operator-only methods on the Hobba program. Only the operator key registered on a position can call them, and each one is scoped so the engine can manage the working side of a position without ever being able to touch your collateral.

This is a high-level summary - integrators never call these methods; they are listed so you know exactly what the automation can do.

Borrows additional USDC against a user’s collateral and deposits it directly into the position’s current yield vault. This is how idle borrowing power becomes the Active band - the borrowed funds go straight from the lender into the vault and are recorded as the position’s working cost basis. The funds never pass through any external wallet.

The reverse: withdraws working capital from the vault and repays the lender with it. Sonnar uses this when a position’s LTV drifts above the target band, or to unwind entirely when vault yield no longer beats the borrow rate.

Realizes vault profit for a position. The program computes on-chain how much the vault shares have earned above the deposited cost basis, withdraws exactly that profit, uses it to repay the user’s lending debt, and sends any remainder to the user’s wallet. A small performance fee on the profit goes to the protocol treasury; all published vault APYs are already net of it.

Moves a position’s entire working balance from its current vault to a better one - withdraw from the old vault, deposit into the new - in a single operation. Sonnar triggers this when another approved vault’s APY beats the current vault by a configured threshold.

Claims vault incentive tokens (e.g. KMNO farm rewards) accrued by a position’s vault shares, as part of routine upkeep.


Two properties hold across all five methods, enforced by the program itself:

  1. Funds only move along the loop - lender ↔ vault ↔ user’s debt/wallet. There is no code path by which an operator method transfers collateral out or directs funds to a third party.
  2. The working borrow is tracked as a cost basis on the position, so the engine’s capital is always separable from the user’s loan. Harvests pay the user’s debt; the user-facing “what you owe” figure never includes the working borrow.

User methods - deposit, borrow, repay, withdraw - are completely independent of these and always available to the position owner.