Skip to content

@armada/sdk / index / grossUpShieldFee

Function: grossUpShieldFee()

grossUpShieldFee(net, tiers): bigint

Defined in: src/tx/shield-fee.ts:40

Gross up a desired NET amount to the smallest gross note value G such that shieldNet(G) >= net — so a relayer fee note nets its target after the pool deducts the shield fee (SPEC §4.6.1). The per-component floors make this non-closed-form: start from the combined-rate ceil (which always nets ≥ target, since sum-of-floors ≤ floor-of-sum) and tighten down to the true minimum. Retires the tracked shield-fee-formula-mismatch shortcut — the SDK computes what the contract enforces.

Parameters

net

bigint

tiers

ShieldFeeTiers

Returns

bigint