Skip to content

Auto-Repayment

Auto-repayment is the mechanism by which AsiliChain loans repay themselves — triggered by the physical act of coffee being exported, with no collection agent, no manual payment, and no default risk from borrower non-cooperation. The exporter confirms the EXPORTED stage after obtaining the Department of Coffee Development export permit — see Export Certification & Physical Journey for the full certification process.

sequenceDiagram
    participant BUY as European Buyer
    participant EXP as Exporter Dashboard
    participant M as Mantle (Contracts)
    participant LV as LendingVault.sol
    participant H as Hedera HCS
    participant FB as Fonbnk
    participant F as 👨‍🌾 Farmer MTN MoMo
    BUY->>EXP: Pays USDC for shipment
    EXP->>M: TraceLog.updateStage(batchId, EXPORTED)
    M->>LV: EXPORTED event detected
    LV->>LV: Calculate: principal + interest + 4% APR protocol fee + 2% APR reserve
    LV->>LV: Repay MFI pool (principal + interest)
    LV->>LV: Transfer 4% APR protocol fee to ProtocolFee.sol
    LV->>M: CreditScore.update(farmerID, +50)
    M-->>H: SETTLED stage recorded
    LV->>FB: POST /fonbnk/v2/order (net balance to farmer)
    FB-->>F: UGX credited to MTN MoMo

All rates are APR on principal. For a $2,500 loan at 16% total APR over 90 days:

ComponentRate (APR)AmountRecipient
Principal repayment$2,500.00LendingVault → MFI pool
MFI interest10%$61.64LendingVault → MFI pool
Protocol fee4%$24.66ProtocolFee.sol
Credit loss reserve2%$12.33LendingVault reserve buffer
Net to farmer$2,401.37Farmer via Fonbnk
Total from buyer16%$5,000.00

Traditional agricultural microfinance fails on collection — a borrower who has spent the loan cannot repay even if willing. AsiliChain’s auto-repayment resolves this structurally:

Traditional modelAsiliChain model
Seasonal repayment dependent on farmer finding cashRepayment triggered by buyer’s USDC payment
Collection agent required per borrowerZero collection infrastructure
Default when harvest fails or price dropsLendingVault pauses on drought risk signal; forbearance built in
No consequence for strategic defaultCreditScore −100; future loans blocked protocol-wide

If a harvest fails or market conditions prevent export:

  1. Cooperative triggers LendingVault forbearance request
  2. 3-of-5 multisig governance vote required to approve
  3. 90-day extension granted — no penalty during forbearance
  4. If batch is subsequently exported, auto-repayment executes normally
  5. If loss is confirmed total, credit loss reserve absorbs shortfall; MFI pool protected up to reserve threshold

Every auto-repayment that executes successfully adds +50 to the farmer’s on-chain CreditScore. After three successful loan cycles, a farmer at 650 qualifies for a higher LTV tier and larger loan ceiling — creating a path from subsistence-scale to cooperative-scale financing.