Skip to main content

Create and Manage Offers

This chapter describes how sell-side marketplace offers are created, indexed, monitored, and progressed into trading and payment settlement. An offer can be created by an Issuer on the primary market or by an Investor on the secondary market. In both cases, the offer creator acts as the seller of the bond tokens.

Business Flow

  1. Offer Initiation:

    • The seller decides to place bond tokens on the marketplace.
    • On the primary market, the seller is the Issuer offering newly issued bonds to investors.
    • On the secondary market, the seller is an Investor or another current bond holder reselling bonds they already own.
    • The seller defines the commercial terms of the offer: bond identifier, total amount, lot size, unit price, currency, expiry, and whether buyers may submit counter-offers.
    • A buyer can later accept the offer as-is or submit a counter-offer with different price or volume terms.
  2. On-Chain Offer Registration:

    • The offer is registered on-chain through the marketplace smart contract, represented in the current contract interface as InterestDiscovery.registerOffer(offer).
    • The on-chain OfferInput contains:
      • isin: bond identifier,
      • totalAmount: total number of bond tokens listed,
      • lot: minimum trade lot,
      • unitPrice: price per unit,
      • currency: payment currency,
      • expiry: offer expiry timestamp,
      • allowCounterOffers: whether negotiated buyer proposals are allowed.
    • After successful registration, the smart contract emits OfferRegistered.
  3. Publication, Indexing, and Custody:

    • The Indexer observes OfferRegistered and loads the full offer detail from the marketplace contract through getOffer(offerId).
    • The indexed MarketOffer becomes the offchain read model used by the platform UI and downstream services.
    • The indexed offer state includes the owner/seller, traded token, token id, lot size, unit price, currency, expiry, available amount, amount currently reserved in deals, sold amount, counter-offer flag, active flag, and escrow manager reference.
    • The marketplace custody model uses escrow-related contract state to prevent the same listed token amount from being freely reused while it is committed to an active offer or deal.
  4. Offer Management:

    • Offer state is managed through on-chain events and reflected in the indexed marketplace read model.
    • OfferRegistered creates an active market offer.
    • AmountsUpdated updates availableAmount, inDealsAmount, and soldAmount as buyers accept the offer or deals move through their lifecycle.
    • OfferCancelled marks the offer as inactive and prevents further direct execution.
    • DealCreated means a buyer accepted an offer directly or a counter-offer deal was created.
    • CounterOfferResolved records the seller's decision on a negotiated counter-offer. If accepted, the counter-offer enters the same purchase payment flow as a directly accepted offer.
  5. Transition to Payment Settlement:

    • The Core Payment Service starts after a marketplace deal exists.
    • For directly accepted offers, it listens for DealCreated events with deal type OFFER.
    • For negotiated trades, it listens for CounterOfferResolved events and continues only when accepted = true.
    • The service creates a local bond purchase payment, resolves applicable fees, sends payment instructions to the PSP, marks buyer payment on-chain through resolvePayment(dealId, true), and completes seller-side settlement through settleDeal(dealId).

Sequence Diagram