@lelantos-org/sdk / protocol / unitFee
Function: unitFee()
ts
function unitFee(units, feeBps): bigint;Defined in: @lelantos-org/sdk/dist/protocol/fees.d.ts:20
Fee on a count of normalized units, rounded up; mirrors Fees.unitFee.
A yield asset charges its fee in units, which keeps the escrow digest index-free. One unit is worth scale base units, so flooring would charge nothing below BPS_DENOMINATOR / feeBps units. The pool rounds up, so every yield-branch quote must too: a quote one unit low produces a Permit2 pull the pool refuses.
Parameters
| Parameter | Type |
|---|---|
units | bigint |
feeBps | bigint |
Returns
bigint