This repo implements the hook contract that enables swap fee discounts in a PancakeSwap Infinity (v4) pool for long-term token holders.
Specifically, users (who have made at least 1 swap in the pool) are categorized into different fee discount tiers according to their last 30-day Time-Weighted Average (TWA) balances of a given ERC-20 token. The TWA token balance is attested trustlessly using Zero-Knowledge Proofs generated by Brevis zkCoprocessor solution.