Skip to main content
POST
Seller Financing is in beta and runs on Ethereum Sepolia instances only for now (DEVELOPMENT instances on Ethereum). A PRODUCTION instance, or one on another network, answers 503 SELLER_FINANCING_UNAVAILABLE. See Seller Financing.
Builds the move of a market to the implementation the factory binds today, as unsigned calldata for the market’s own admin. The market is a UUPS proxy: only a wallet that holds DEFAULT_ADMIN_ROLE on it can upgrade it. Trusset holds no role on a market and never signs this transaction. See Market generations. The answer depends on where the market stands, as Get Market reports it in implementation:
  • First implementation, the factory binds a delivery-against-payment one (implementation.action: "UPGRADE"). The build is upgradeToAndCall(newImplementation, migrateEncumbrance()) on the market: the upgrade and the recount of the live sales in one transaction. upgradeAction reads UPGRADE. Simulated from from, a wallet without DEFAULT_ADMIN_ROLE answers 409 TX_WOULD_REVERT with AccessControlUnauthorizedAccount, naming the role and its holders.
  • Delivery against payment without the recount (implementation.action: "MIGRATE"), for example a market whose admin upgraded without the call. The build is migrateEncumbrance() alone. Any wallet can sign it; it only recounts and runs once. upgradeAction reads MIGRATE. Until it runs, deliveries, unwinds, claims, liquidations and custody cancellations answer 409 MIGRATION_PENDING, because the market’s pooled numbers do not know the sales locked before the upgrade.
  • The factory still binds the first implementation: 409 UPGRADE_NOT_AVAILABLE.
  • The market already runs what the factory binds: 409 MARKET_UP_TO_DATE.
  • The market runs a delivery-against-payment implementation other than the one the factory binds: 409 UPGRADE_NOT_SUPPORTED. This build only moves first-generation markets.
The implementation the market runs is read from its ERC-1967 slot and the recount from its OpenZeppelin Initializable version, both fresh on every build. Which implementation the factory binds is read from marketImplementation() on the factory. What changes with the upgrade, as the response lists in changes:
  • A payoff no longer credits the seller. The downpayment and the principal stay in the market until the asset is delivered, by the buyer with Claim Asset or by the seller or an operator with Deliver Asset.
  • 30 days after a payoff without delivery, the buyer can unwind a sale whose asset cannot be delivered, and an operator can unwind any, with Unwind Sale. The interest stays with the seller.
  • The market counts the asset sold on live sales per seller (freeze) or for the adapter (custody), and a return to the seller unfreezes only what the seller’s other sales do not need.
  • A listing whose interest periods are shorter than its runtime needs a grace period of at least one day on chain.
Sales paid off before the upgrade keep the first implementation’s terms: the seller was credited at the payoff, the buyer still claims the asset, and the sale cannot be unwound. There is no rollback once a payoff is held, because the first implementation does not know the held payment. The same build is offered in the Issuer Portal, on the Seller Financing page, as Upgrade or Recount next to the market, signed by the connected wallet.

Path Parameters

string
required
The market’s record ID, as id on List Markets.

Body Parameters

string
required
The wallet that signs: a wallet that holds DEFAULT_ADMIN_ROLE on the market for the upgrade, any wallet for the recount alone. Without it the answer is 400 FROM_REQUIRED.

Response Fields

object

Error Codes