Synthetic allocation records separate 4800 principal units, 1176 participant bonus units and 210 creator and executor units, with withdrawals and remaining liability shown separately.
A role-aware report preserves principal and reconciles recorded withdrawals against the amount still owed.

A challenge member can finish with a larger claimable balance than their participation allocation. That happens when the same wallet also created the activity or helped execute settlement. Put the whole balance under a label such as participation rewards and the page will overstate what daily check-ins earned.

The ChainPunch source reviewed for this article makes that distinction concrete. It allocates principal and participant bonus, credits creator and settlement execution fees, then lets each wallet withdraw its accumulated balance. Its historical local demonstration even shows a member with 24.9 test CIT from participation and 27 test CIT available across roles. Those figures describe a demonstration, with returned principal included. They are not customer earnings.

This exercise builds an offline reconciliation report for that accounting boundary. You will run a synthetic export, corrupt it, and get a failing check that identifies the problem. The lab targets Python 3.10 or later and was tested here on Python 3.13.3. The minimum version was not separately tested. No wallet, node, credentials or additional packages are needed.

Start from a completed allocation

The current contract settles in separate statistics and distribution phases. An unfinished distribution cannot provide a final accounting report. The downloaded checker therefore rejects any snapshot whose phase is not complete. A production export would need to read confirmed state at a declared block, including both cursors and task completion. The fixture simply supplies a declared phase so that the exercise remains local.

The input also uses a task-level liability total. This is the amount still owed after participant withdrawals, including the reserved platform fee in our fixture. It is not the entire contract token balance. Several activities can share a contract, and the inspected contract accumulates platform fees globally. Comparing one task against that global balance would mix scopes.

Every amount is an integer string in a single synthetic asset's smallest unit. The fixture does not assign real token decimals. That choice lets the checker preserve exact arithmetic even when amounts exceed the range that a floating-point representation can store exactly.

def units(value):
    if not isinstance(value, str) or not re.fullmatch(r"0|[1-9][0-9]*", value):
        raise ValueError("amounts must be canonical unsigned integer strings")
    return int(value)

This function uses re from the Python standard library, imported by the supplied script. Decimal formatting belongs after reconciliation. Do not round a displayed token amount and then use it as the accounting input.

Run the supplied cohort

Download the challenge reconciliation lab, extract it into an empty directory, then run the included commands.

python3 -m unittest discover -v
python3 reconcile.py fixture.json

Three synthetic members contribute 2,000 units each. Another 200 units enter as make-up fees. Penalties total 1,200 units, leaving 4,800 units of principal to return and a pool of 1,400 units to distribute.

The fixture assigns 1,176 pool units to participant bonuses, 140 to the creator and 70 to settlement execution. It reserves 14 for the platform. These are deliberately specified fixture amounts. The checker does not assert that those percentages apply to a running deployment.

Account Principal Participant bonus Other role credits Withdrawn Still claimable
Alice 2,000 490 210 2,700 0
Bob 1,600 392 0 0 1,992
Cara 1,200 294 0 0 1,494

Alice's participation allocation is 2,490 units. Her combined credit is 2,700. Only the 490-unit bonus belongs in the participant bonus column. The 2,000-unit principal return should remain visible to someone comparing what they put in with what came back.

After Alice's synthetic withdrawal, the export reports 3,500 units of task liability. Bob and Cara account for 3,486; the platform reserve accounts for the remaining 14. The input and remaining obligations reconcile exactly.

Give the pool its own equation

A useful report must explain both the total and its composition. The supplied implementation checks principal against penalties first, then checks the pool's uses separately.

if roles["principal"] + penalty != units(data["stake_in"]):
    raise ValueError("principal plus penalties differs from stake input")
if sum(roles[r] for r in ROLES if r != "principal") + platform != penalty + units(data["makeup_in"]):
    raise ValueError("pool uses differ from penalties plus makeup fees")

The variables come from the validated export inside reconcile. These checks would catch a bonus mislabeled as principal even if the grand total remained unchanged. Another check rejects any account whose recorded withdrawal exceeds its accumulated credit. A balanced global total cannot excuse paying the wrong member.

The source's allocation algorithm handles integer remainders by reducing the remaining reward and weight after each eligible participant. This exercise consumes allocations already produced by settlement. It does not reproduce that algorithm or calculate how much someone should earn from check-in counts. That boundary keeps the lab focused on reconciling the report presented to members.

Reproduce a duplicated export

Run the following command from the extracted directory. It deliberately adds the same credit twice and leaves the original fixture intact.

python3 - <<'PY'
import json
from pathlib import Path
snapshot = json.loads(Path("fixture.json").read_text())
snapshot["credits"].append(dict(snapshot["credits"][0]))
Path("broken.json").write_text(json.dumps(snapshot))
PY
python3 reconcile.py broken.json

The process exits with code 2 and reports a duplicate record identity. A retrying exporter can produce that failure if it appends a previously fetched range. The repair is to rebuild the export with a stable identity for each accounting record and reconcile again. Inventing a new ID for the repeated row would conceal the duplicate and cause a later accounting failure.

A real adapter should anchor imported events to a chain and contract, then retain transaction and log identities. Derived principal and bonus rows need distinct component identifiers beneath that event identity. The current FundsCredited event carries a combined amount rather than a business-role label, so the adapter would also need the relevant allocation data and execution context. The downloadable format is an original teaching format, not an existing ChainPunch export endpoint.

A completed-allocation decision leads from challenge inputs to separate accounting roles, then withdrawn funds and remaining liabilities.
A role-aware report preserves principal and reconciles recorded withdrawals against the amount still owed.

Use the result in an acceptance review

The tests include missing allocations, duplicate records, premature completion, an overdrawn account and a task liability that omits the platform reserve. They also exercise large integers and a full-attendance fixture with a zero pool. That last case matters because the current pool comes from penalties and make-up fees. A reward estimate should be able to show zero.

These offline checks validate the exercise's report semantics. They do not verify a deployed balance, transaction finality or the accuracy of an export's role attribution. They also assume no emergency exits and no platform-fee withdrawal during the fixture interval. A production adapter must reconcile those separately and retain the block range used for its evidence.

For a ChainPunch challenge implementation, bring one finished activity and the member-facing settlement labels to review. Ask for an acceptance report that separates principal, additional allocation, role-based fees and confirmed withdrawals. That gives the organizer a concrete way to explain why a wallet's balance changed.

Source review covered CheckInTask.sol settlement, credit and withdrawal paths on 29 October 2026, together with the ChainPunch product narrative and local demonstration audit. The source paths and SHA-256 hashes are retained in this draft's metadata. The download contains original exercise code and synthetic data only.