Development of Blockchain Diploma and Certificate Verification System
Diploma verification is a concrete business task: employer or educational institution must verify document authenticity in minutes without lengthy correspondence with the university. Blockchain works here as an immutable notary: the fact of diploma issuance is fixed and available for verification by anyone.
Minimal Necessary Architecture
Diploma verification doesn't require complex VC or DID systems. A simple scheme is enough: university stores diploma hash in blockchain, on verification we compare the hash of the presented document with on-chain record.
contract DiplomaVerification {
struct DiplomaRecord {
bytes32 documentHash; // SHA-256 hash of PDF document
address institution;
string recipientName; // name — NOT address, students often without wallets
string degree;
uint256 issuedAt;
bool revoked;
}
// documentHash => DiplomaRecord
mapping(bytes32 => DiplomaRecord) public diplomas;
// Authorized educational institutions
mapping(address => bool) public authorizedInstitutions;
mapping(address => string) public institutionNames;
event DiplomaIssued(bytes32 indexed documentHash, address indexed institution, string recipientName);
event DiplomaRevoked(bytes32 indexed documentHash, string reason);
function issueDiploma(
bytes32 documentHash,
string calldata recipientName,
string calldata degree
) external onlyAuthorized {
require(diplomas[documentHash].issuedAt == 0, "Already issued");
diplomas[documentHash] = DiplomaRecord({
documentHash: documentHash,
institution: msg.sender,
recipientName: recipientName,
degree: degree,
issuedAt: block.timestamp,
revoked: false
});
emit DiplomaIssued(documentHash, msg.sender, recipientName);
}
function verifyDiploma(bytes32 documentHash) external view returns (
bool isValid,
string memory institution,
string memory recipientName,
string memory degree,
uint256 issuedAt
) {
DiplomaRecord memory record = diplomas[documentHash];
return (
record.issuedAt != 0 && !record.revoked,
institutionNames[record.institution],
record.recipientName,
record.degree,
record.issuedAt
);
}
}
QR Code Verification
Convenient UX for employers: diploma contains QR code, scanning opens verification page.
// Generate QR code on diploma issuance
function generateDiplomaQR(documentHash: string, chainId: number): string {
const verificationUrl = `https://verify.university.edu/diploma?hash=${documentHash}&chain=${chainId}`;
return QRCode.toDataURL(verificationUrl);
}
// Verification page
async function verifyDiploma(documentHash: string): Promise<VerificationResult> {
const provider = new ethers.JsonRpcProvider(RPC_URL);
const contract = new ethers.Contract(DIPLOMA_CONTRACT, ABI, provider);
const [isValid, institution, recipientName, degree, issuedAt] =
await contract.verifyDiploma(documentHash);
return { isValid, institution, recipientName, degree, issuedAt: new Date(issuedAt * 1000) };
}
Batch Issuance
For universities — issuing hundreds of diplomas after graduation:
function issueDiplomaBatch(
bytes32[] calldata documentHashes,
string[] calldata recipientNames,
string[] calldata degrees
) external onlyAuthorized {
require(documentHashes.length == recipientNames.length, "Length mismatch");
for (uint i = 0; i < documentHashes.length; i++) {
diplomas[documentHashes[i]] = DiplomaRecord({
documentHash: documentHashes[i],
institution: msg.sender,
recipientName: recipientNames[i],
degree: degrees[i],
issuedAt: block.timestamp,
revoked: false
});
}
emit BatchDiplomasIssued(msg.sender, documentHashes.length, block.timestamp);
}
Or more gas-efficient option — Merkle tree: store only batch root hash, verification via Merkle proof.
Network Deployment
For maximum reliability and longevity — deploy on multiple networks or use L2 with calldata published on Ethereum.
| Network | Advantages | Disadvantages |
|---|---|---|
| Ethereum mainnet | Maximum reliability | High gas |
| Polygon | Cheap, fast | Less decentralized |
| Arbitrum | L2 reliability, cheap | Requires L2 familiarity |
Recommendation: Polygon for MVP, Arbitrum for production reliability.
Development of diploma verification system (contract + university admin portal + verification page) — 3-5 weeks.







