NEAR testnet · Social Money

Proof, not promises

Attack Lab: try to break it.

Any peer allocation system can be gamed. The honest question is how much gaming costs. This page runs the attack FairShare is built to resist: three people form a collusion ring and point only at each other. It runs with the exact settlement maths from the contract, and the numbers are the contract property test property_collusion_ring_earns_less_than_honest.

The ring against the honest round SIMULATED

The two rounds share the same 9 people and the same 60 NEAR envelope. In the ring round Ada, Ben and Cara help only each other, so the other six point at each other, because the trio did no work for them. In the honest round the same three people help distinct outsiders, and every outsider points back at the trio, so the trio is fed by six distinct givers.

Fairness Stress Test SIMULATED

Pick a scenario. Each one settles with the exact contract maths, a 5 NEAR envelope, six members, 100 points each. The table shows who gave what to whom, then what each member is paid and how their standing moves. The verdict names what the mechanism caught and where its limit is. The members here are made up names for the simulation, not real people.

All five scenarios, compared

Highest and lowest payout in each scenario, same 5 NEAR envelope, same contract maths. The chart is computed when the page loads, so it always matches the tables above.

Loading the scenario comparison…

Why the ring earns less

Two forces work against the ring. First, breadth. The square root rewards points that arrive from many distinct givers. 100 points arriving from 2 givers scores 19600. The same 100 points arriving from 5 givers scores 48400. The trio in the ring round is fed by 2 givers each. The same trio in the honest round is fed by 6 givers each. Second, the reciprocity discount. Every mutual leg in the ring is cut by half of the shared amount, so the loop keeps less of what it passes around. A one way gift of 50 points scores 4900. The same 50 points given mutually scores 2500.

The result, from the property test: the ring trio earns 3.506 NEAR each on average, while the other six earn 8.246 NEAR each in the same round. In the honest round the same three people earn 15.000 NEAR each, capped, while the other six earn 2.499 NEAR each. Honest giving earns the trio 11.493 NEAR more per person than the ring did.

The honest limit of this test

This is a simulation, not a proof that collusion is impossible. The test holds outsider behaviour under reciprocal behaviour: in the ring round the trio does no work for the outsiders, so the outsiders point at each other; in the honest round the trio helps outsiders, so the outsiders point back at them. With outsider behaviour held fixed, a ring that only feeds itself would capture more, not less. If the whole round colludes, the maths cannot save it. The maths makes closed loop giving costly. It does not make it impossible. Coordinape said the same about its own model: it could be gamed and had blind spots, and worked best where a circle had already built trust. FairShare says the same, in plain sight.

Popularity bias remains too. Well liked members attract points. The cap and the square root soften it. They do not remove it. Sybil resistance comes from DAO member curation, not from the maths: the contract cannot tell a real member from a second account, and the DAO decides who is a member.

Test vectors: the site matches the contract

The settlement maths on this site is not a rounded copy of the contract. It is the same integer arithmetic, and it reproduces the contract test vectors exactly, to the yocto.

VectorExpectedSite result
Worked example, total score130468130468
Worked example, Alice payout of 5 NEAR0.839 NEAR0.839 NEAR
Worked example, Frank payout of 5 NEAR1.187 NEAR1.187 NEAR
Worked example, dust3 yocto3 yocto
Reciprocity, 50 points one wayScore 4900Score 4900
Reciprocity, 50 points mutualScore 2500Score 2500
Cap test, raw share 79.05%Pays exactly 25 NEARPays exactly 25 NEAR
Collusion property, ring trio each3506716981132075471698113 yocto3506716981132075471698113 yocto
Collusion property, honest trio eachExactly 15 NEARExactly 15 NEAR

Contract suite: cargo test, 31 passed, 0 failed, including a 200 round property test where payout sums never exceed the envelope and no payout exceeds the cap. One failure was found and fixed during the first build: the property test asserted a ring payout from a Python model that used float square roots; the Rust code and the site JS both give 3506716981132075471698113 yocto, and the literal was corrected to that value.

Run the check yourself: in the repo, node hidden_files/dom_test.js exercises the site buttons without a browser and prints the settle rows, the explain rows, and the lab verdict.

Go deeper

  1. Live rounds: round 1 with real members, scores, and payouts, plus the DAO and governance.
  2. How it works: the mechanism in full, with four worked examples and the contract methods.
  3. Home: the promise, the live numbers, and the allocation try out.