Price types and what they are used for
The mark price (not the last trade price) determines risk checks.
DerivaDEX pricing reference for external spot sources, index-price aggregation, mark-price calculation, clamp bounds, and mark-dependent trading checks.