Skip to main content
The phenomenal tree is the marketing layer of the dpnm template. Every $FLOW user occupies exactly one position in the tree. Every extendTree call (and a slice of every buy) pays out to ancestors of the caller — if those ancestors are tree-active.

Shape

                            root
                          /  |  \
                       L1   L1   L1            (3 positions at level 1)
                      /|\  /|\  /|\
                   L2 ... L2 ... L2            (9 positions at level 2)
                       ...
                                                ...
                  L10 ... L10 ... L10           (3^10 = 59,049 positions at level 10)
3 branches × 10 levels = 1 + 3 + 9 + 27 + ... + 3^10 = 88,573 total positions per root (the root itself plus 88,572 descendants).

Spillover — why you earn even without inviting anyone

When a new user calls activate(referrer), the contract walks down the referrer’s subtree:
  1. Try to place the new user in slot 1 directly under the referrer.
  2. If full, slot 2.
  3. If full, slot 3.
  4. If all three direct slots are full → spill down into whichever subtree of the referrer has the lowest fill count.
This means a user who invites no one can still acquire descendants if their upline keeps inviting. New users spill down through the tree to fill the lowest-fill subtree, and those new users count for everyone above them.
Spillover is the killer mechanic. It means your earning potential is tied to your upline’s effort plus your own. You are economically rooting for the people above you to keep selling.

Payout per extendTree($10)

Every time a tree position calls extendTree(months), the protocol pays out marketing rewards 10 levels up the tree:
Level above callerPayout per $10 extend
L1$0.1
L2$0.1
L3$0.1
L4$0.5
L5$0.5
L6$0.5
L7$0.8
L8$0.8
L9$0.8
L10$0.8
Total marketing$5.0
Pool retention$1.0
Treasury$4.0
So $10 extend pays:
  • $5.0 distributed up 10 levels
  • $1.0 retained in pool (raises price)
  • $4.0 to treasury

Payout per buy(...)

The buy fee is 20%, of which 10% (i.e. 10% of the buy value) is the phenomenal tree slice. Distribution across 10 levels follows the same shape proportions as the extendTree payout but scaled to the actual buy size. For a $100 buy:
  • Marketing slice: $10 total.
  • Distributed across L1–L10 in the same 0.1 / 0.5 / 0.8 proportions, i.e. (1+1+1+5+5+5+8+8+8+8) = 50 units → each unit = $0.20.
  • L1 ancestor: $0.20. L4 ancestor: $1.00. L10 ancestor: $1.60.

Inactive ancestors

If an ancestor is not tree-active at the moment of the payout call, their slice is rerouted to treasury. It is not held in escrow; the missed payout is simply forfeited. This is why active status is critical — you do not earn from descendants while inactive. Active status comes from activate(...) (30 days) and is extended by extendTree(months) (30 days × months, max 90-day stack).

A user’s earning loop

1. activate(uplineAddress)              // 30 days active, pay $10
2. (others below you buy/extend)        // your wallet receives marketing payouts
3. before day 30, extendTree(1)         // pay $10 to extend 30 more days
4. (continue earning)
5. ... buy more $FLOW to raise income limit and price ...
Or:
1. activate(uplineAddress)
2. invite 3 friends — they activate under you (slots 1,2,3)
3. each of them invites 3 friends — your L2 fills with 9 positions
4. ... organic growth ...
5. extend regularly to stay active
In a fully spillover scenario (your direct slots fill from upstream, not from you), your earnings come automatically from the protocol’s marketing inflow — passive income tied to the network’s growth.

Querying tree state

const upline = await tree.uplineOf(myAddress);
const directs = await tree.directChildrenOf(myAddress);   // up to 3 addresses
const subtreeSize = await tree.subtreeSize(myAddress);    // total descendants
const myActiveUntil = await flowProtocol.treeActiveUntil(myAddress);
Or:
curl https://api.agentflow.website/me/tree \
  -H "Cookie: af_session=..."
Response includes upline, directs, subtree size by level, active-until timestamp, and lifetime earned per level.

See also