Search projects, hackathons, sponsors and tech

    ← All projects

    AmanaScore

    An AI guardrail blocking non-compliant Hedera transfers with on-chain HCS audit logs.

    Demo

    About

    Islamic finance has very little on-chain compliance infrastructure. Most payment flows do not check whether a transfer is acceptable before executing, and they rarely preserve an auditable trail of that decision. AmanaScore is a Hedera testnet demo that blocks non-compliant transfers with a custom Sharia policy and logs every decision to Hedera Consensus Service (HCS).

    How it's made

    AmanaScore is a Node.js agent built on Hedera Testnet that enforces Sharia-compliance rules before executing any HBAR transfer. I used the Hedera SDK (@hashgraph/sdk) for native CryptoTransfer transactions and Hedera Consensus Service (HCS) for immutable audit logging, plus Hedera Agent Kit to wire the agent's decision-making flow. The architecture is intentionally simple but powerful: a custom ShariaCompliancePolicy module sits as a middleware gate between the agent intent and the Hedera network. Every transfer request first hits the policy lookup — if the recipient is tagged as interest-lending (riba), the transfer is blocked before any network call is made. If the recipient is asset-backed and compliant, the agent signs and submits a live CryptoTransfer to testnet. Unknown recipients fall back to dry-run mode, allowing safe exploration without spending HBAR. For auditability, every decision — allowed, rejected, or dry-run — is serialized to JSON and submitted to a dedicated HCS topic. If no topic ID is configured, the app auto-creates one on first run, making deployment frictionless. I used dotenvx for encrypted secret management and built the entire flow as a single-file demo (demo.js) that runs three scenarios end-to-end in under 10 seconds. The hacky part: I treated the compliance policy as a pre-flight middleware rather than a post-transfer filter. This means non-compliant transactions cost exactly zero HBAR — they never touch the network — while still producing an immutable HCS audit trail of the attempt. This pattern could plug directly into custodian wallets or payment rails that need provable compliance without wasting gas on rejected transactions.