Root creator or carried participant after split.
MagnaFork documentation
Rules you can verify
This is not a brochure and not raw ABI. It is a readable map of MagnaFork rules: what is visible before entry, where the contract places a participant, how USDT moves, and where interface promises stop.
Cycle map
One fork moves from the top position to two child forks
A fork is not just a UI card. It is one on-chain cycle. The contract fills seats top-down; the outer circle funds payout; split carries the structure forward.
Second level fills before the third level.
Third level prepares the outer circle.
Net parts from these entries stay in the contract.
One transaction: payout, parent close, two child forks.
What the contract does
For every entry it selects a fork, picks the next seat, records a position, and executes USDT transfers.
What the interface does not do
It does not assign the best seat, promise payout timing, or manually close or wake a fork.
Amounts and funds
Tier formula
Amounts matter more than slogans. Every tier uses the same formula: fee moves immediately, and payout comes only from eight net parts in the outer circle.
| tier | Entry | 7% fee | Net part | Elder payout |
|---|---|---|---|---|
| 0 | 5 USDT | 0.35 USDT | 4.65 USDT | 37.20 USDT |
| 1 | 50 USDT | 3.50 USDT | 46.50 USDT | 372.00 USDT |
| 2 | 500 USDT | 35.00 USDT | 465.00 USDT | 3720.00 USDT |
Amounts and funds
Where an entry goes
Entry routes
Invite, Open entry, and guarded entry solve different problems
MagnaFork's main routing question is not where a user wants to land, but which route the contract can confirm at transaction time.
Invite entry
The user arrives through a fork code or link. If the anchor is already closed, the contract looks for a live fork inside the same tree.
- refreshes the activity window
- can wake a SLEEP fork
- never leaves the invite tree
Open entry
A public route without a specific invite link. It first completes incomplete root forks, then routes across HOT and WARM groups.
- does not refresh the 24 / 72 hour window
- does not promise a specific fork
- creates a root fork if none is suitable
Guarded entry
The same entry flow, with a check for the expected fork, level, and seat before USDT is transferred.
- protects against stale UI
- reverts before transferFrom
- shows the user the real route
States
ACTIVE / HOT / WARM / SLEEP / CLOSED
Status is not decoration. It shows whether a fork can accept entries and whether it participates in Open entry.
a new invite can wake the fork
| Label | Meaning | Routing effect |
|---|---|---|
| ACTIVE | fork can accept entries | base on-chain status |
| HOT | invite was within the last 24 hours | gets the priority share of Open entry |
| WARM | invite was 24 to 72 hours ago | gets a smaller share of Open entry |
| SLEEP | 72 hours without invite entry | does not receive Open entry, but can wake by invite |
| CLOSED | fork completed payout/split | does not accept direct entries |
Split map
How a full fork becomes two child forks
After 8/8 the parent closes. The contract does not shuffle seats randomly: left and right forks receive deterministic positions.
Left fork
- lvl2[0] -> elder
- lvl4[0..1] -> lvl2
- outer[0..3] -> lvl4
Right fork
- lvl2[1] -> elder
- lvl4[2..3] -> lvl2
- outer[4..7] -> lvl4
Examples
Three situations where the rules become clear
These cases make the boundaries visible: where a link stays useful, where activity matters, and where the UI must protect the user from races.
Invite survives split
A user enters a root fork code that has already reached 8/8 and became CLOSED.
The contract does not send entry into a closed fork. It selects a live child fork inside the same tree.Open entry does not wake SLEEP
A fork is active, but no invite entry has happened for more than 72 hours.
Open entry skips it. A new invite entry can return the fork to ACTIVE.The contract must confirm the seat
The user saw a seat in the UI, but someone else filled it before confirmation.
Guarded entry reverts before USDT transfer if the target changed.Full specification
All rules in one place
Below is the user-facing full specification. It is longer, but it now reads as a reference: thesis first, then verifiable rules.
Smart-contract rules
Full MagnaFork V1 Specification
This is the user-facing version of the full contract specification: not an ABI dump, but the complete logic of entries, routing, statuses, payouts, splits, and promise boundaries.The user sees a compact map first, then the full mechanics. This is not a marketing promise and not a developer-only note: it is how the contract executes MagnaFork.
Three levels use the same logic and do not mix with each other.
The operating fee is taken from every entry.
The net part of upper seats goes to the operating wallet; the net part of the outer circle stays in the contract until payout.
When the outer circle is full, payout and fork split execute in one transaction.
HOT up to 24 hours, WARM up to 72 hours, SLEEP after 72 hours without invite entry.
Incomplete root forks are completed first; HOT and WARM groups are used after that.
A link to a closed root fork routes into a live fork in the same tree.
The owner does not assign forks or payouts manually.
1. What matters before entry
MagnaFork should be understandable before a transaction: the user sees action conditions, not a result promise.
- Before confirmation, the user sees the participation level, entry amount, operating fee, and entry route: invite entry or Open entry.
- One wallet can hold multiple positions. The contract has no “1 wallet = 1 position” limit.
- The final fork and seat are determined by the contract at transaction time; the interface cannot manually assign a better slot.
- If the user confirms a specific route and seat, the app should use guarded entry so the transaction does not execute against a changed fork.
2. Levels and amounts
Every level uses the same formula; only the entry size changes.
- Level 0: 5 USDT entry, 0.35 USDT fee, 4.65 USDT net part, 37.20 USDT payout.
- Level 1: 50 USDT entry, 3.50 USDT fee, 46.50 USDT net part, 372 USDT payout.
- Level 2: 500 USDT entry, 35 USDT fee, 465 USDT net part, 3720 USDT payout.
- The contract stores amounts in token base units and assumes USDT-style 6 decimals; it does not call token decimals itself.
3. Roles and permissions
The administrative surface is narrow: it cannot manually steer cycles.
- The owner can only change the operating wallet and the address that signs root-fork creation.
- The operating wallet receives fees and the net part of upper seats.
- The authorization address signs root-fork permissions; each signature is bound to level, link, deadline, chain, contract address, and creator.
- A participant can create an authorized root fork, enter by invite, enter through Open entry, or use guarded entry.
4. Fork structure
A fork is one participation cycle inside a selected level.
- A root fork starts its tree: it has no parent, and its root id equals its own id.
- Child forks inherit the root tree id and store the parent fork id.
- A fork stores the top position, two second-level seats, four third-level seats, and an eight-seat outer circle.
- After split, the parent records left and right child forks and becomes closed.
5. Positions and fill order
Every entry creates a separate position, and the next seat is selected from the top down.
- Fill order: top position, two second-level seats, four third-level seats, then outer circle slots 0 through 7.
- A position stores owner, fork, seat level, slot index, retained amount, retained-in-contract flag, and active flag.
- Top, second-level, and third-level positions open with no retained amount inside the contract.
- Outer-circle positions open with the retained net part, because it funds the current payout.
6. How funds move
Fee, upper-seat net part, and outer-circle net part should not be confused.
- For the top, second-level, and third-level seats, the full entry amount goes to the operating wallet; events record fee and net part separately.
- For the outer circle, the fee goes to the operating wallet and the net part stays in the contract.
- The top-position payout equals eight net parts from the outer circle.
- The retained amount in a position is not a user withdrawal balance; it is accounting for the amount that funds the current cycle payout.
7. Root fork creation
A root fork can appear through authorization or through Open entry.
- Authorized creation requires a non-empty link, unexpired deadline, unused link id, and a signature from the current authorizer.
- The signature cannot be reused by another wallet, on another chain, or on another contract instance.
- Open entry can create a root fork automatically when no suitable fork exists in the selected level.
- The root-fork creator takes the top position, and the full entry amount goes to the operating wallet.
8. Invite entry
An invite preserves activity and keeps the entry tree useful after split.
- If the linked fork is open and has a seat, entry goes into that fork.
- If the linked fork is closed, the contract looks for a live fork inside the same tree.
- HOT/WARM forks are preferred first, then SLEEP forks with open seats.
- Invite entry refreshes the activity window and can wake a SLEEP fork back to active state.
9. Open entry
Open entry moves the shared flow, but it does not promise a specific fork.
- Open entry first completes incomplete root forks in the selected level before their first split.
- After that, the contract chooses between HOT and WARM: three out of four entries prefer HOT, one out of four prefers WARM.
- If the preferred group is empty, the contract tries the other group.
- If no suitable fork exists, Open entry creates a new root fork for the incoming participant.
10. HOT / WARM / SLEEP
These short activity labels make routing status readable.
- HOT: an active fork with an open seat where the last invite entry was no older than 24 hours.
- WARM: an active fork with an open seat where the last invite entry is in the 24-72 hour window.
- SLEEP: a fork after 72 hours without invite entry; it does not receive Open entry, but can wake by invite.
- Incomplete root forks before their first split are prioritized separately and are not treated as regular HOT/WARM candidates.
11. Guarded entry
Guarded entry prevents the user from confirming a stale route.
- The app can pass the expected fork, seat level, and slot index.
- If the contract selects a different seat at execution time, the transaction reverts before USDT is taken.
- For Open entry that creates a new root fork, the expected values are zero.
- Regular and guarded entry have the same economics; guarded entry only protects against a changed route.
12. Payout and split
When the outer circle is full, the contract pays out and continues the tree.
- A cycle is ready when the top position, two second-level seats, four third-level seats, and the full 8/8 outer circle are filled.
- The contract closes parent positions, transfers payout to the top position, and creates two child forks.
- The left child fork receives the first second-level participant, the first two third-level seats, and the first four outer-circle seats.
- The right child fork receives the second second-level participant, the last two third-level seats, and the last four outer-circle seats.
13. Routing queues
The contract does not scan the whole fork history on every entry.
- Open entry uses queues for incomplete root forks, HOT, and WARM.
- An old link to a closed fork uses preferred and fallback queues inside that fork's tree.
- Queues are cleaned lazily: stale candidates are removed during selection or synchronization.
- Each attempt scans up to 32 candidates for Open entry routing and up to 32 candidates for invite routing.
14. What can be verified
Key actions leave blockchain events and readable state.
- Events record entry, fee, upper-seat net part, root-fork creation, Open entry assignment, and position opening.
- Events also record SLEEP, wake, payout, split, operating-wallet change, and authorizer change.
- Read methods allow checking level amounts, forks by level, fork state, outer circle, fork tree, and position state.
- The interface and operator should rely on these data points, not invented or service-only numbers.
15. Read methods and version flags
The contract gives the interface enough state to avoid guessing.
- The interface can read level amounts, used root links, the Open entry counter, and fork ids by selected level.
- It can read base fork state, the outer circle, tree links, position ids by slot, and individual position state.
- The contract reports support for key capabilities: Open-entry root bootstrap, invite-tree routing, upper-seat net-part sweep, root-completion priority, guarded entry, and indexed queues.
- These version flags help the interface distinguish MagnaFork V1 behavior from older or future contracts.
16. Errors and reverts
If a required condition is not met, the contract reverts instead of partially executing.
- Entry is rejected for an invalid level, invalid fork, closed fork, no empty seat, or changed guarded-entry target.
- Root-fork creation is rejected for an empty link, expired deadline, reused link, or signature not from the current authorizer.
- Administrative actions are rejected for zero addresses and for callers other than the owner.
- If a required USDT transfer fails, state is not partially updated.
17. Contract boundaries
The full specification matters because it also states what the contract does not do.
- The contract does not promise yield, payout timing, or that a specific entry will necessarily lead to payout.
- The contract has no user refund from a position, no pause, no manual payout, and no level changes after deployment.
- The contract has no one-wallet-one-position limit and does not distribute funds through the inviter parameter.
- The AI operator and interface help users understand the rules and choose the next checkable step, but they cannot change smart-contract execution.
