/* acq_fee.c - fee / tax math (leaf util). */
#include "acq_common.h"

long acq_fee(long amount, long bps)
{
    if (amount < 0 || bps < 0) return 0;
    return amount * bps / 10000;
}

long acq_vat(long supply)
{
    if (supply < 0) return 0;
    return supply / 10;          /* 10% VAT */
}

long acq_wht_amt(long fee, long bps)
{
    if (fee < 0 || bps < 0) return 0;
    return fee * bps / 10000;
}
