TribFi Protocol Documentation • Base Mainnet

TribFi Protocol Whitepaper

The decentralized architecture for fair-launch community tokens, zero-rug locked liquidity, and lifetime creator rewards on Base. Built with fixed 1 Billion token supplies, 5% anti-snipe limits, and permanent non-custodial smart contracts.

Section 16 • Developer Reference, Security & Legal
~5 min read•16 of 20

TribFi DEX Aggregator & AllowanceTarget: Isolated Multi-Hop Routing

Vault-isolated token approvals, router whitelist, and call-injection defenses

1. Vault-Isolated Approval Architecture

Traditional DEX aggregators combine swap routing and token allowances in a single contract. If the routing contract has a vulnerability, all approved user tokens can be drained. TribFi separates these components into TribFiAggregator.sol and TribFiAllowanceTarget.sol.

2. Whitelisted Execution Enclaves

TribFiAllowanceTarget.sol only permits token transfers to an immutable whitelist of verified DEX routers (Uniswap V2, Aerodrome, SushiSwap). It rejects arbitrary transfer calls.

3. Calldata Validation & Security Invariants

Every swap calldata payload is strictly decoded and validated to prevent arbitrary external calls or target hijacking.