Skip to content

sellNight

sellNight(nightIn, decl, mid, discountBps): bigint

Sell side: the user gives nightIn; we pay USDM out and the fees on top of it, so the user receives gross / (1 + fee bps) where gross is the mid less discountBps.

Parameter Type
nightIn bigint
decl Pick<FeeDecl, "protocolBps" | "appBps">
mid Mid
discountBps number

bigint