Market Trading
The Market contract is a decentralized order book for buying and selling tokenized points before TGE. It handles offer creation, collateral validation, escrow minting, and routing filled offers into settlement.How Offers Work
What is an Offer?
An offer is a binding commitment to trade points at a specific price with optional or required USDC collateral backing, depending on the market configuration. Example: “I’ll sell you 500 of my points for 50 USDC, and I’m putting up 50 USDC as collateral to guarantee this deal.”Collateral
Collateral is posted in USDC and held by the market until the offer is settled, cancelled, or moved into overdue settlement. Markets that cannot directly escrow or custody the underlying points can use collateral-weighted minting to reduce seller default risk. Those markets can define:- whether collateral is enforced
- a minimum collateral weight an offer must satisfy
- an ideal USDC collateral per point target
chXXX on fill. Higher
collateral generally means a higher mint weight, subject to the escrow token’s cap.
On markets where Checkpoint can escrow the underlying points directly, buyers mint chXXX 1:1 with
the filled points amount as usual.
Offer Status
| Status | Description |
|---|---|
| OFFER_CREATED | The offer is new and waiting for buyers to fill it. |
| OFFER_FILLED_PARTIAL | The offer has been partially filled by one or more buyers, with more supply remaining. |
| OFFER_FILLED | The offer is completely filled by buyers. |
| OFFER_SETTLED | The offer has been settled with tokens provided to the Settlement contract for buyers to claim. |
| OFFER_SETTLED_WITH_VESTING | The offer has been settled but has a vesting schedule. Tokens unlock gradually over time. |
| OFFER_CANCELLED | The offer was cancelled by the maker before any fills, and collateral was returned. |
| OFFER_OVERDUE_SETTLED | The settlement deadline passed without the seller settling. The offer’s filled USDC and collateral were moved into the program-wide settlement pool. |
Creating a Sell Offer
All offers include the amount of points to sell, the price in USDC, and the collateral amount in USDC. Offers can be cancelled with collateral returned minus any configured cancellation fee, as long as they have no existing fills.You must have a valid deposit receipt with enough available points to create an offer.
Filling an Offer
When you see an offer you want to accept, you fill it as a buyer: To fill an offer, you send USDC to theMarket contract. The escrow mint path depends on the
market type:
- on standard escrowable markets, buyers mint
chXXX1:1 with the filled points amount - on non-custodial markets, buyers mint from the offer’s collateral weight
- the market either mints 1:1 or computes a weight from the offer’s collateral versus the market’s ideal collateral per point
- on weighted markets, the escrow token uses that weight to mint a discounted, neutral, or bonused
amount of
chXXX - the protocol may also mint additional escrow tokens to the treasury via
fillExtra
Once an offer is filled, both the maker and filler cannot cancel or reverse it.
Partial Fills
Offers can be filled multiple times if there’s enough supply. This means multiple buyers can participate in the same offer, each getting a share of the points without the seller needing to create separate offers. Consider this example: A seller creates an offer for 1000 points for 100 USDC. Three buyers fill it partially over time:| Step | Buyer | Amount | Price | Remaining | Status |
|---|---|---|---|---|---|
| 1 | Buyer 1 | 400 pts | 40 USDC | 600 pts | PARTIALLY FILLED |
| 2 | Buyer 2 | 300 pts | 30 USDC | 300 pts | PARTIALLY FILLED |
| 3 | Buyer 3 | 300 pts | 30 USDC | 0 pts | FILLED |
Cancelling Offers
You can cancel an offer if no one has filled it yet: When you cancel an offer, your held points return to available so you can use them elsewhere. Your collateral is returned to you, and the offer becomes inactive. You can only cancel an offer if it hasn’t been filled at all. Once someone fills even part of it, you can’t cancel anymore. If there’s a cancellation fee configured, it will be deducted from your returned collateral.Shortfall of Points
Points balances may unexpectedly change after an offer is created. If a seller’s points decrease, they may not have enough points to fulfill all their offers. In this case, fillers can callsettlePointsChange() to recover their USDC.
Example:
- Seller deposits 500 points
- Seller creates an offer for 500 points at 100 USDC
- Filler fills the offer, paying 100 USDC and receiving the escrow amount minted for that market
- Seller’s points drop to 300 (due to an external points program update)
- Filler calls
settlePointsChange()to settle with the new points balance
- Filler must return the full escrow amount minted from that fill, which is then burned by the market
- Filler receives their USDC back in full
- Seller’s held points are released
- The filler is able to fill the offer again with the new points balance
If after settling there are no fillers left, the offer is able to be cancelled by the seller.
Settlement
Standard Settlement
The normal path when the seller provides tokens before the settlement deadline: When TGE happens and the actual token launches, the seller callssettleOffer() to finalize the
deal. The market validates that the settlement has not passed the deadline, takes the seller’s
tokens, deposits them to Settlement, and sends the filled USDC proceeds to the seller minus
the configured settlement fee. The seller also gets their collateral back unless the offer is under
vesting settlement.
Importantly, buyer claims are settled against the program-wide settlement distribution, not
directly against a single offer. Each settled offer contributes inventory into that shared
distribution.
Crosschain Settlement
This is useful when the points program is on a different chain than the Market. Create an offer on one chain, the buyer fills it, but the token launches on another chain. To settle:- Provide tokens to the
RemoteSettlementcontract on the token’s chain - Call
settleOfferViaOracle()onMarketwith the chain ID, transaction hash, and Oracle signature - The oracle verifies the settlement, and the Market sends you USDC and collateral back
RemoteSettlement just like standard settlement.
Partial Fills
If the offer is partially filled, the seller only needs to provide the percentage of tokens that was filled. Formula: Example:- Offer: 1000 points for 100 USDC
- Buyers fill 60 USDC total (60% of the offer)
- Seller only needs to provide 60% of the final token amount assigned to that offer
Settlement or
RemoteSettlement.
Vesting Settlement
For token programs with vesting schedules, settlement happens in multiple phases: When a token has a vesting schedule, settlement works differently:-
Initial Settlement (
settleOffer()): The seller callssettleOffer()and sends only the tokens that are not vested (the currently claimable tokens according to the oracle’s vesting schedule). These non-vested tokens are deposited to the Settlement contract and become available for the buyer to claim immediately. - Vesting Period: As time passes, the remaining vested tokens unlock gradually according to the vesting schedule. The oracle tracks when each tranche of tokens becomes claimable. The buyer can claim these tokens from the Settlement contract as they unlock.
-
Complete Settlement (
completeVestingSettlement()): Once the vesting period is fully complete, the seller callscompleteVestingSettlement(). The oracle verifies that vesting has completed, and the seller finally receives their collateral back.
Overdue Settlement
When a seller fails to settle by the deadline, the overdue offer is not resolved buyer-by-buyer. Instead, its filled USDC plus seller collateral is moved into the settlement contract as a program-wide USDC pool for that points market.Settlement Process
WhensettleOverdueOffer() is called after the deadline:
- The offer’s filled USDC and seller collateral are deposited into
Settlement - That amount increases the USDC pool tracked for the entire points program
- Escrow holders later claim a pro-rata share of that pooled USDC during distribution
- There is no separate overdue fee in the current settlement flow
Fee Structure
The market currently exposes three main fee levers:- Settlement fee: taken from seller proceeds when
settleOffer()orsettleOfferViaOracle()succeeds - Cancellation fee: taken from seller collateral when cancelling an unfilled offer
- Fill extra: extra escrow tokens minted to the fee recipient on every fill
fillExtra is a small inflation at the escrow-token layer used for seeding liquidity.
It increases total escrow supply rather than deducting USDC from the buyer or seller.