Why put it on a chain
The data could live in a database. The point is the score.
The STOCK Act gives members 45 days to report a trade, and the penalty for filing late is small. Commercial trackers parse the PDFs, but their scores are private: you cannot check how a number was produced or whether the history was edited.
On a blockchain the ledger is tamper-evident and the scoring function is public code. A trade is written once; its score is computed by the contract at insert time; anyone can call the scorer with the same inputs and verify the result.
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.
Five contracts, 374 lines
Small enough for one reviewer to audit in an hour. 18 Foundry tests, all passing.
| 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 proof of concept. Trades are real public disclosures, but where a filing date was missing the demo assumes trade date + 30 days, so the scores illustrate the method and say nothing about any individual.