How money moves
Perpetuals handles token taxes and perp profits in four steps:
- Flap collects the token’s buy and sell taxes.
- The share assigned to the vault is swapped into USDG.
- The USDG is split between the strategy and protocol treasury.
- Profits returned from Lighter fund buybacks and dividends.
Launch fees, Flap fees, gas, DAO proposal fees, direct tax dividends, strategy-profit dividends, and both buyback streams use different contracts and accounting.
1. Trading taxes
Buy and sell tax are configured at launch. Collected tax is divided among four destinations:
token trading tax ├── strategy vault ├── direct holder dividends ├── deflation / burn └── liquidity provision
These percentages must total 100%. The vault receives at least the protocol minimum. The remaining destinations are chosen by the creator within launch constraints.
These percentages describe the token’s tax-distribution budget. Flap calculates its launchpad commission separately.
2. Vault split
The vault receives tax income in the token’s trading-pair asset and swaps it into USDG. The router then applies a fixed split:
100 USDG from the vault ├── 75 USDG strategy capital └── 25 USDG protocol treasury
The 75 USDG stays assigned to the token and can be sent through its custody contract to Lighter. The other 25 USDG goes to the protocol treasury.
If the creator sends 60% of trading taxes to the vault, the 75/25 split applies to that 60% vault share.
3. Treasury split
The treasury divides the 25% protocol share into two USDG budgets:
25 USDG protocol treasury revenue ├── 20 USDG protocol buyback budget └── 5 USDG operating budget
This means every 100 USDG from the vault ends up as 75 USDG for the strategy, 20 USDG for protocol buybacks, and 5 USDG for operations.
Treasury accounting is maintained both globally and by launched token. Each deposit records total revenue, buyback allocation, operating allocation, current balances, and withdrawals.
Buyback budget
The treasury tracks a buyback budget for each token. Buyback spending and withdrawals are recorded onchain.
Operating budget
Operating funds are tracked separately from buyback funds, with their own balance and withdrawal history.
Accidental transfers
ETH or tokens sent directly to the treasury are kept separate from protocol revenue and recorded treasury balances.
4. Perp profits
When USDG returns from Lighter, the keeper marks how much is original trading capital and recovered losses. The router records the rest as profit.
USDG returned from Lighter − original trading capital − recovered losses = strategy profit
At launch, the creator picks the percentage of profit sent to holder dividends. The router applies that split when funds return:
profit dividends = profit × profitDividendBps ÷ 10,000 profit buyback = profit − profit dividends
The creator may choose any dividend share from 0% to 100%. A 0% dividend share sends all classified profit to buyback-and-burn. A 100% dividend share sends all classified profit to the selected holder dividend asset.
Two types of buybacks
Strategy-profit buybacks
The buyback share of perp profits is held for that token. A keeper converts the USDG into the trading-pair asset when needed, buys the token through Flap, and sends the purchased tokens to the burn address.
Protocol-treasury buybacks
The protocol treasury also keeps a buyback budget for each token. An approved signer submits the amount, route, minimum output, and deadline to the buyback executor.
How to tell them apart
One type comes from profits made by the token’s Lighter strategy. The other comes from the protocol’s share of vault revenue. They are tracked separately onchain.
Two types of dividends
Direct trading-tax dividends
These are selected in the token-tax allocation and handled by Flap’s tax and dividend system. They do not require a profitable perpetual strategy.
Strategy-profit dividends
These come from perp profits. A keeper converts the USDG into the chosen dividend asset and deposits it into the token’s Flap dividend contract.
Timing
Perp buybacks and dividends happen after funds return from Lighter and are recorded by the router.
Worked examples
Vault-revenue example
Suppose the vault sends 1,000 USDG to the router:
- 750 USDG becomes strategy capital;
- 250 USDG enters the protocol treasury;
- 200 USDG is attributed to protocol buybacks;
- 50 USDG is attributed to operations.
Strategy-profit example
Suppose 140 USDG returns from Lighter and the keeper marks 100 USDG as original trading capital. The remaining 40 USDG is profit. If the launch sends 25% of profits to dividends:
- 100 USDG returns to available strategy capital;
- 10 USDG enters the profit-dividend bucket;
- 30 USDG enters the strategy-profit buyback bucket.
Rounding
Contract arithmetic uses integers. The router computes the protocol amount with floor division and assigns the remainder to strategy capital. The treasury computes the buyback amount with floor division and assigns its remainder to operations.
Profit dividends also round down; the remaining unit stays with the buyback portion. Small deposits can therefore differ by the smallest USDG unit from a percentage calculated with decimal arithmetic.
Other fees
- Protocol launch fee
- Native fee sent to the launchpad fee receiver. It is not treasury revenue from token tax.
- Flap salt-lock fee
- External launch fee forwarded to Flap. It is not retained by the strategy vault.
- DAO proposal fee
- Native fee deposited into separate treasury proposal-fee accounting.
- Gas, trading, and funding
- Network and venue costs that can affect execution or strategy performance.