Розробка блокчейн-рішення для освіти
Освіта і блокчейн перетинаються в кількох точках: верифікація дипломів і сертифікатів, управління академічними кредитами, token-gated доступ до курсів, портфеліо навчання протягом життя. Практичність блокчейну тут визначається конкретною задачею — не будуйте on-chain систему там, де достатньо цифрового підпису.
Де блокчейн дійсно потрібен
Верифікація credentials третіми сторонами — роботодавець може перевірити диплом за хвилини без звернення до університету, який може закритися або не відповідати. Це реальна проблема: тисячі навчальних закладів, різні бази даних, міжнародні запити.
Portable learning records — людина навчається в різних установах все життя. Єдиний on-chain портфель агрегує credentials з усіх джерел.
Token-incentivized learning — нараховування токенів за виконання завдань створює вимірний вклад студента в екосистему. Використовується в Web3-нативних освітніх платформах.
Прозора акредитація — on-chain реєстр акредитованих установ, неможливо підробити.
Архітектура системи
Institution Registry
contract InstitutionRegistry {
struct Institution {
string name;
string country;
string accreditationBody;
uint256 accreditedUntil;
bytes32 metadataHash; // hash додаткових даних в IPFS
bool active;
}
mapping(address => Institution) public institutions;
mapping(address => bool) public accreditationAuthorities;
event InstitutionRegistered(address indexed institution, string name);
event InstitutionAccredited(address indexed institution, uint256 validUntil);
// Тільки акредитаційні органи можуть додавати установи
function registerInstitution(
address institutionAddress,
string calldata name,
string calldata country,
string calldata accreditationBody,
uint256 validUntil
) external onlyAccreditationAuthority {
institutions[institutionAddress] = Institution({
name: name,
country: country,
accreditationBody: accreditationBody,
accreditedUntil: validUntil,
metadataHash: bytes32(0),
active: true
});
emit InstitutionRegistered(institutionAddress, name);
}
function isActiveInstitution(address institution) public view returns (bool) {
Institution memory inst = institutions[institution];
return inst.active && block.timestamp <= inst.accreditedUntil;
}
}
Credential Issuer
contract CredentialIssuer {
struct Credential {
address recipient;
address issuer;
string credentialType; // "BACHELOR", "MASTER", "CERTIFICATE", "MICROCREDENTIAL"
string program;
string institution;
uint256 issuedAt;
uint256 completedAt;
bytes32 metadataHash; // IPFS CID з деталями: оцінки, курси, стенограма
bool revoked;
}
InstitutionRegistry public registry;
// tokenId => Credential (SBT: non-transferable)
mapping(uint256 => Credential) public credentials;
// recipientAddress => tokenIds
mapping(address => uint256[]) public recipientCredentials;
uint256 private _nextTokenId;
function issueCredential(
address recipient,
string calldata credentialType,
string calldata program,
uint256 completedAt,
bytes32 metadataHash
) external returns (uint256 tokenId) {
require(registry.isActiveInstitution(msg.sender), "Not accredited institution");
tokenId = _nextTokenId++;
credentials[tokenId] = Credential({
recipient: recipient,
issuer: msg.sender,
credentialType: credentialType,
program: program,
institution: registry.institutions(msg.sender).name,
issuedAt: block.timestamp,
completedAt: completedAt,
metadataHash: metadataHash,
revoked: false
});
recipientCredentials[recipient].push(tokenId);
emit CredentialIssued(tokenId, recipient, msg.sender, credentialType);
return tokenId;
}
// Тільки issuer може відкликати (наприклад, за академічні порушення)
function revokeCredential(uint256 tokenId, string calldata reason) external {
require(credentials[tokenId].issuer == msg.sender, "Not issuer");
credentials[tokenId].revoked = true;
emit CredentialRevoked(tokenId, reason);
}
function verifyCredential(uint256 tokenId) external view returns (
bool valid,
address recipient,
string memory credentialType,
string memory institution,
bool issuerAccredited
) {
Credential memory cred = credentials[tokenId];
return (
!cred.revoked,
cred.recipient,
cred.credentialType,
cred.institution,
registry.isActiveInstitution(cred.issuer)
);
}
}
Open Badges 3.0 та W3C Verifiable Credentials
Стандарт IMS Global Open Badges 3.0 базується на W3C Verifiable Credentials. Це забезпечує сумісність: credentials можуть бути верифіковані будь-яким VC-сумісним інструментом.
Структура VC для academic credential:
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/openbadges/v3"
],
"type": ["VerifiableCredential", "OpenBadgeCredential"],
"issuer": {
"id": "did:ethr:0xUniversityAddress",
"name": "Технічний університет"
},
"credentialSubject": {
"id": "did:ethr:0xStudentAddress",
"achievement": {
"name": "Бакалавр комп'ютерних наук",
"type": "Degree",
"criteria": "Завершення 240 ECTS кредитів"
}
},
"proof": {
"type": "EthereumEip712Signature2021",
"verificationMethod": "did:ethr:0xUniversityAddress#controller",
"proofValue": "0x..."
}
}
On-chain зберігається хеш цього документу + статус (відкликаний чи ні). Сам документ в IPFS, доступний через CID.
Token-Gated Learning та Incentives
Для EdTech платформ з token economy:
contract LearningIncentives {
IERC20 public learningToken;
struct Course {
string name;
uint256 completionReward; // токени за завершення
uint256 quizReward; // токени за кожен тест
uint256 participationReward; // токени за активність (постури, дискусії)
}
mapping(uint256 => Course) public courses;
// Запобігання farmed rewards: cooldown між активностями
mapping(address => mapping(uint256 => uint256)) public lastActivityTime;
uint256 constant ACTIVITY_COOLDOWN = 1 hours;
function completeQuiz(
uint256 courseId,
uint256 quizId,
bytes calldata oracleSignature // підпис оракула про результат
) external {
// Верифікуємо підпис оракула
require(verifyOracleSignature(msg.sender, courseId, quizId, oracleSignature),
"Invalid oracle signature");
require(
block.timestamp > lastActivityTime[msg.sender][courseId] + ACTIVITY_COOLDOWN,
"Cooldown active"
);
lastActivityTime[msg.sender][courseId] = block.timestamp;
learningToken.mint(msg.sender, courses[courseId].quizReward);
emit QuizCompleted(msg.sender, courseId, quizId);
}
}
Оракул (backend сервер) верифікує що студент дійсно пройшов тест і підписує результат. Контракт перевіряє підпис оракула — це запобігає farming без реального навчання.
DID для студентів та викладачів
Кожен учасник ідентифікується через DID. Це вирішує проблему зміни email, імені, приналежності — ідентичність персистентна.
Student DID: did:ethr:0xStudentAddress — контролюється студентом, credentials накопичуються протягом всього життя.
Institution DID: did:web:university.edu або did:ethr:0xInstAddr — верифікується в Institution Registry.
DID Document студента включає їх публічний ключ для верифікації підписів, пов'язані адреси (ім'я ENS, соціальні профілі через EAS attestations).
Стек розробки
| Компонент | Технологія |
|---|---|
| Смарт-контракти | Solidity + OpenZeppelin ERC-721 (SBT) |
| VC/Open Badges | @digitalcredentials/vc + @digitalcredentials/ed25519 |
| DID | did:ethr (ethr-did) або did:web |
| IPFS | web3.storage / NFT.storage |
| Індексування | The Graph |
| Frontend | React + wagmi + DID resolver |
| Портал видавця | Next.js (інституційний інтерфейс) |
Фази розробки
Фаза 1 (3-4 тиж): Institution Registry, Credential Issuer контракти, базова верифікація.
Фаза 2 (2-3 тиж): W3C VC інтеграція, IPFS metadata сховище, Open Badges 3.0 сумісність.
Фаза 3 (2-3 тиж): Портал студента (перегляд credentials, спільне використання), Портал установи (видача credentials).
Фаза 4 (2-3 тиж, опціонально): Token incentives система, DID інтеграція, learning analytics.
MVP (Institution Registry + Credential Issuer + верифікація) — 6-8 тиж. Повна платформа — 3-4 місяці.







