Public records and verifiable scores
Readers should be able to check both a record and the calculation applied to it.
The project starts with congressional trade disclosures and asks how to preserve a record of the data used for scoring. It brings the trade, scoring inputs and result into a public ledger. This makes the calculation inspectable without relying on the website's display alone.
TradeRecord stores entries without an edit or delete operation and calculates each score when the entry is added. The current prototype still relies on its owner to submit records and set the weights. Public computation does not verify that the original filing was parsed correctly.
The score
Four sub-scores from 0 to 100, weighted in basis points that sum to 10,000.
| Factor | Weight | 0 when | 100 when |
|---|---|---|---|
| Disclosure delay | 15% | filed same day | ≥ 90 days (45-day limit = 50) |
| Committee jurisdiction | 30% | no related committee | sits on a related committee |
| Proximity to a hearing | 35% | ≥ 30 days away | ≤ 3 days away |
| Trade size | 20% | < $15,000 | ≥ $1,000,000 |
function score(uint32 delayDays, uint8 committeeRelevant, uint256 amountUsd, uint32 daysToHearing)
external view returns (uint8)
{
uint256 total = ( _delaySubscore(delayDays) * weights.delay
+ (committeeRelevant > 0 ? 100 : 0) * weights.committee
+ _hearingSubscore(daysToHearing) * weights.hearing
+ _amountSubscore(amountUsd) * weights.amount ) / 10_000;
return uint8(total > 100 ? 100 : total);
}
Weights are owner-settable in this version, with every change emitted as an event; the design hands them to holders of the project's SUN token in a later version. Integer arithmetic means the calculator above matches the contract exactly.
Contracts
Five Solidity contracts. The course submission includes 18 Foundry tests.
| Contract | Role | Address (Base Sepolia) |
|---|
Live demo
The original course frontend, reading the deployed contracts through a public RPC. No wallet needed to browse.
This is a testnet prototype with 5 members and 15 trades. Where a filing date was missing, the demo uses trade date + 30 days. The score illustrates the formula; it is not evidence of misconduct. The presentation also proposes token-funded data submissions and community voting on weights. Those are future plans, not features of this demo.