Skip to main content
POST
Builds the sweepOperatorFees transaction, which pays everything the market has booked for the operator to the operator wallet. The operator wallet is the market’s operatorFeeRecipient: the wallet that took the lender-of-record role, unless it has rotated itself since with Rotate Operator Wallet. Any wallet may sign. The destination is fixed on the market, so the signer can neither withhold the payment nor redirect it, and nothing reaches the signer. The market pays whichever wallet is the operator wallet when the transaction mines, so fees booked before a rotation go to the new wallet. On the current market implementation the operator’s booked balance has three sources. It takes a fixed 8 percent of repaid interest after the infrastructure fee and 8 percent of every fixed transaction fee. It also takes distributor share realized while no provider held pool shares. Get Cashflows itemises all three.

Path Parameters

string
required
Market ID.

Body Parameters

string
Hash of the sweep you broadcast. Send it to confirm the transaction and record the result. Omit it to receive the calldata.

Response Fields

object
The sweep pays whatever is booked when it mines, not the amount quoted when the calldata was built. A repayment landing in between raises the figure, so read the paid amount from the confirm call.
The API refuses before you sign whenever the contract would revert: when no lender of record has taken the market, and when nothing is booked for the operator. A confirmed sweep is recorded on the market as an OPERATOR_FEES_SWEPT transaction, visible through List Transactions.

Error Codes

Confirming with txHash can also return any transaction verification error.