how it works trade to dividend

Six steps, and every one is on chain

Nothing here happens in a backend. Each step below names the contract that does it and the number it produced when measured against live BNB Chain state.

the path one trade's 2%
A single trade's tax travelling the whole path. It leaves the trade as token, accrues inside the token contract until Flap's processor converts a batch to BNB, lands in the vault where a two-store receive books it, waits for the next five-minute wake, is built into a 3× long with one flash-funded swap, and finally returns as a gain that splits 60/40 between holders and the project.
step 1 the trade

2% leaves the trade as token

Buy or sell, the token withholds 2%. At this point it is still token, not money, and it sits inside the token contract. Nothing has reached the vault yet.

Buy / sell tax
200 / 200 bps
Symmetric, and fixed for 100 years at launch.
step 2 conversion

Flap converts a batch to BNB

Accrued tax is liquidated when it crosses a threshold set at launch, not on every trade. That batching is why the vault's receive() has to be almost free: Flap forwards with a plain call, and if that call ever ran out of gas or reverted, tax collection for the token would break permanently.

receive() gas
9,133
Warm path. 57,433 cold. The protocol cap is 1,000,000.
step 3 the wake

The vault wakes on a schedule

Flap's trigger service calls the vault every five minutes. Each wake buys the next slot before doing any work and runs the job inside a try, so a job that fails cannot break the chain that would have retried it. When there is nothing to do, the next slot is booked an hour out instead.

Per wake
0.0002 BNB
The service's quoted fee, paid out of undeployed revenue.
Callback gas
1,206,637
Against a hard 2,000,000 cap. 40% headroom.
If the chain stops
kickstart()
Permissionless. Anyone can restart settlement.
step 4 the build

One flash loan, one swap, three passes

Venus checks collateral at the instant of the borrow, before the proceeds become collateral. So a loop can only take the sliver its current collateral supports, and those passes converge slowly — eighteen swaps to reach 3×. A flash loan reverses the order: supply first, borrow second.

loop versus flash cost to reach 3x
Two ways to reach the same position. The loop path takes eighteen swaps and costs 0.30%, each pass limited to what the collateral already posted can support. The flash path supplies the borrowed collateral first and repays from the position it just built: one swap, three passes, and a measured cost of 0.12–0.18% depending on size.
PathSwapsCostWhy
Loop180.30%Converges at cf/health = 0.667 per pass. Measured before the flash path replaced it.
Flash10.12–0.18%Supply first, borrow second, repay from the position. Measured at 1, 5 and 20 BNB.

The flash pool must be a different fee tier from the swap pool. A V3 pool is locked for the duration of its own flash callback, so borrowing and swapping in the same pool reverts LOK.

step 5 the position

3× is the ceiling, not a choice

Venus lends against BNB at an 80% collateral factor. Health is supply × CF / debt, and Venus liquidates at 1.00. Run leverage against that and the product line writes itself.

At 5×, health is exactly 1.00. That is not an aggressive position, it is one that liquidates on arrival. This vault does not offer it: the target is a hard-coded constant at 3×, and the build caps debt by the health floor rather than by what Venus would allow.

TargetHealthLiquidates on
2.00×1.600−37.5%
3.00×1.200−16.7%
4.00×1.067−6.3%
5.00×1.0000.0%
step 6 the payout

A gain leaves, the principal stays

When the position has gained at least 0.02 BNB, a wake distributes it. The unwind takes only the gain — measured at three sizes, what it frees over what it gained is 1.00× — and health rises rather than falls, because the position gets smaller relative to its collateral.

Freed vs gained
1.00×
Measured at 1, 3 and 4 BNB of gain.

Health after
1.290
Up from 1.208, not down.

Holders are paid through the token's own dividend contract in WBNB. Flap's dividends are claimed, not pushed — call withdrawDividends() when you want yours. They do not expire. A holding below the dividend threshold earns no share; that rule is Flap's, not ours.

Now read what can go wrong

A 3× position is liquidated by a 16.7% move. That number belongs on the page, not in a footnote.

Risks Economics