Skip to content

How AsiliChain Works

AsiliChain activates Uganda’s government coffee farmer data financially, turning compliance records into credit infrastructure without building a parallel database.

sequenceDiagram
    participant F as 👨‍🌾 Farmer
    participant USSD as *384# USSD
    participant API as AsiliChain API
    participant MAAIF as MAAIF NTS
    participant M as Mantle (Contracts)
    participant H as Hedera HCS
    participant KP as Kotani Pay
    participant MTN as MTN MoMo
    F->>USSD: Dials *384#, selects "Deliver coffee"
    USSD->>API: Session data + farmer ID
    API->>MAAIF: Verify farmer ID + GPS
    MAAIF-->>API: Farmer confirmed, farm GPS returned
    API->>M: BatchToken.mint(farmerID, weight, grade, GPS)
    M-->>H: Stage event logged (DELIVERED)
    API->>KP: POST /kotanipay/payout (amount_usdc, phone)
    KP-->>MTN: USDC → UGX → MoMo credit
    MTN-->>F: Payment notification (< 60 seconds)

Every batch delivered through AsiliChain produces four outputs automatically, regardless of whether the farmer has a loan:

OutputHow it worksWho benefits
60-second paymentKotani Pay converts USDC to UGX and credits MTN MoMoEvery farmer
EUDR complianceGPS + stage data auto-generates a DDS at export timeCooperatives, exporters
Market price transparencyChainlink oracle prices are visible to the cooperative dashboardEvery farmer
On-chain credit historyCreditScore begins building from first delivery, usable for future loansEvery farmer

Every BatchToken moves through eight defined stages, each recorded on Hedera HCS:

StageActionWho records
1. REGISTEREDFarm GPS mapped, farmer ID verifiedMAAIF NTS / agent
2. DELIVEREDCoffee weighed and submitted at collection pointField agent via USSD
3. GRADEDQuality assessment (moisture, screen size)Cooperative quality officer
4. MILLEDCoffee processed (hulled, cleaned, sorted)Mill operator
5. WAREHOUSEDPhysical coffee stored under warehouse receiptWarehouse manager
6. COMMITTEDBuyer PurchaseOrder confirmed on-chainCooperative / exporter
7. EXPORTEDShipment leaves UgandaUCDA export permit confirmed by exporter
8. SETTLEDBuyer USDC payment received → loan auto-repaidLendingVault auto-executes

For farmers who want working capital:

graph LR
    REG["Farm registered
GPS verified"]
    GCT["GrowingCropToken
Issued at planting
LTV 30–65%"]
    LOAN1["Pre-harvest loan
14–18% APR"]
    BT["BatchToken
Issued at delivery
LTV 60–70%"]
    PO["PurchaseOrder
Buyer commits"]
    WRT["WarehouseReceiptToken
LTV 75–80%"]
    EXP["EXPORTED event"]
    REPAY["Auto-repayment
CreditScore +50"]
    REG --> GCT --> LOAN1
    LOAN1 --> BT --> PO --> WRT --> EXP --> REPAY

Credit is optional. Farmers who do not want loans still complete the same delivery and receive the same 60-second payment and compliance data.