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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
nightIn |
bigint |
decl |
Pick<FeeDecl, "protocolBps" | "appBps"> |
mid |
Mid |
discountBps |
number |
Returns
Section titled “Returns”bigint