Skip to main content
POST
Builds the unsigned transaction that moves one of the market’s proxies onto the implementation the factory serves today, then confirms it once mined. target picks the proxy: the market itself, its interest rate model, its liquidation router or its insurance fund. Each has its own administrator, and the response names who must sign.
An upgrade that moves the market onto the fixed fee shares changes what liquidity providers earn from the moment it mines. Repaid interest then pays the fixed 8 percent operator share and 5 percent distributor share out of what is left after the 15 percent infrastructure fee. Interest that open loans accrued before the upgrade is split at the new rates when it is repaid. Third parties that provided directly keep their positions but can add liquidity afterwards only through a vault. While providers hold shares or loans are open, the build is refused with FEE_MODEL_IMPACT_UNACKNOWLEDGED. Tell the providers, then send the request again with acknowledgeFeeModelImpact set to true.A pool open to third parties without a register refuses their deposits after the upgrade. That lasts until the admin installs a provider register, and perimeter.note says whether it applies.
The target implementation is always read from the factory and cannot be named in the request. A target that lacks the features its generation exists for is refused, so an upgrade never moves a proxy backwards. A market the factory did not deploy is refused with MARKET_NOT_IN_FACTORY. Get Upgrade Status shows what each upgrade would change before you build it.

Path Parameters

string
required
Market ID.

Body Parameters

string
default:"market"
The proxy to upgrade: market, rateModel, router or insuranceFund.
boolean
market only. Send true to build an upgrade onto the fixed fee shares while providers hold shares or loans are open.
string
Hash of the mined upgrade transaction. Send it with the same target to confirm the upgrade. Omit it to receive the calldata.

Who Signs

Every target is refused with MARKET_PENDING_CURATOR while the market has no lender of record. The model and the fund pass to the owners the lender of record named only when each nominee accepts ownership. Get Handover returns those acceptance transactions.

Calldata Response

object
Broadcast transaction first, then pokeSnapshot and any followUps.steps in order, all from the market admin. They carry no chainId of their own, so send them on the chain the top-level chainId names.

Confirmed Response

The confirm call verifies that the transaction targeted the proxy for target, called upgradeToAndCall or upgradeTo, and emitted Upgraded on that proxy. It then reads the new implementation from the receipt.
object

Error Codes

Confirming with txHash can also return any transaction verification error.