Never deliver first
Settlement is simpler than clearing and has one rule that carries almost all of its safety.
The danger is principal risk: delivering your side and receiving nothing. Unlike replacement cost, which is proportional to a price move, this is proportional to the full value, and no amount of collateral makes it acceptable.
The fix is mechanical rather than contractual. Delivery versus payment links the two legs so that the securities transfer and the cash transfer either both occur or neither does. Neither party can be left having performed alone.
That is an atomicity guarantee. It is not a promise that both sides will behave, and it does not depend on either side's creditworthiness. It is a property of the settlement system, enforced by whoever controls both records.
The result is that principal risk in domestic securities settlement is essentially engineered out. What remains is the risk of the trade not settling, which is a liquidity and replacement problem, not an existential one.

