DDO Contract Deal Guide
This guide covers Singularity's allocation-based contract deal path, exposed as deal type ddo.
If your program refers to this path as PoRep onboarding or allocation-backed contract usage, use ddo in Singularity commands and API payloads.
What DDO changes
Unlike legacy market deals:
Singularity submits allocations on-chain instead of sending a boost proposal
the storage provider fetches data from the download URL attached to each allocation
payment setup happens before allocation submission
deals become
activeonly afterdeal-trackersees the allocation activate on-chain
Prerequisites
You need:
a preparation with CAR files ready to schedule
a wallet attached to that preparation
an FEVM RPC endpoint
the DDO Diamond proxy contract address
the DDO Payments contract address
an ERC20 payment token address supported by the target provider
a reachable download URL template for each piece
The target provider must also be:
resolvable by Lotus
active in the DDO contract
configured to accept the payment token you pass to
deal-pusher
Required worker configuration
Start deal-pusher with the DDO contract settings:
Start deal-tracker with DDO tracking enabled:
Without the DDO-enabled deal-tracker, DDO deals will be created in proposed state but will not transition to active when the allocation is sealed.
Creating a DDO schedule
Create a schedule with:
--deal-type ddoa provider address that Lotus can resolve
a non-empty
--url-template
Example:
--url-template should include {PIECE_CID} so each allocation points at the correct CAR file.
How scheduling works
For each batch, Singularity:
validates the provider against the DDO contract
checks that each piece size fits the provider's configured min and max limits
builds per-piece download URLs from
url_templateensures deposit and operator approval through the payments contract
submits the allocation transaction
waits for confirmation depth
parses allocation IDs from the receipt
writes DDO deal rows into the database
Runtime flags
The main DDO tuning flags on deal-pusher are:
--ddo-batch-size--ddo-confirmation-depth--ddo-poll-interval--ddo-term-min--ddo-term-max--ddo-expiration-offset
Defaults today are:
batch size:
10confirmation depth:
5poll interval:
30smin term:
518400epochsmax term:
5256000epochsexpiration offset:
172800epochs
Observing state
You can inspect DDO deals with the normal deal list APIs and CLI filters:
Expected state flow:
proposed: allocation submitted, waiting for activationactive: allocation activated on-chain and picked up bydeal-tracker
Batch DDO schedules
To schedule DDO deals across multiple preparations and providers in one command, use create-batch with --replication ddo=1:
This creates the cross-product of DDO schedules (2 preparations x 1 deal type x 2 providers = 4 schedules), all tagged with the --group label for easy management. See Create a deal schedule for more on batch creation.
Updating an existing DDO schedule
DDO schedules can be updated, but keep these invariants in mind:
deal_typemust remain a valid deal typeurl_templatecannot be empty while the schedule isddo
If you are migrating from a legacy market schedule, creating a fresh DDO schedule is safer than editing the old one in place.
Current limitations
DDO activation tracking is implemented, but expiry or terminal-state tracking is not yet defined.
The current implementation waits for tx confirmation before writing deal rows; crash recovery for the gap between confirmation and DB insert is not yet hardened.
Last updated
Was this helpful?