Skip to content

ProtocolFee.sol

Collects and distributes the 4% AsiliChain protocol margin from every loan repayment. Controlled by a 3-of-5 multisig. Transparent on-chain — every fee collection is publicly auditable.

Every auto-repayment distributes as follows:
Gross repayment from buyer USDC payment
├── Principal + MFI interest → LendingVault MFI pool (repaid)
├── 4% protocol fee → ProtocolFee.sol (this contract)
├── 1–2% credit loss reserve → LendingVault reserve buffer
└── Net balance → Farmer via Kotani Pay

The 4% protocol fee collected by this contract is allocated by governance vote:

AllocationPercentagePurpose
Protocol operations40%API infrastructure, Hedera HCS fees, Pinata costs
Development reserve30%Smart contract upgrades, audits, new integrations
Credit loss backstop20%Additional insurance beyond per-loan reserve
Community / impact10%Cooperative training, field agent support
// Collect fee (VAULT_ROLE — called by LendingVault on every SETTLED event)
function collect(uint256 amountUsdc) external onlyRole(VAULT_ROLE);
// View accumulated fees
function totalCollected() external view returns (uint256);
function pendingDistribution() external view returns (uint256);
// Distribute to treasury (MULTISIG_ROLE — 3-of-5 required)
function distribute(address recipient, uint256 amount)
external onlyRole(MULTISIG_ROLE);
// View distribution history
function getDistributions()
external view returns (Distribution[] memory);

Protocol fee withdrawals require 3-of-5 multisig approval. Signers at launch:

SignerRole
AsiliChain founding team wallet 1Co-founder
AsiliChain founding team wallet 2Co-founder
Independent technical advisorExternal signer
MFI representative walletInstitutional accountability
ReservedFuture: community / MAAIF observer

This prevents unilateral treasury withdrawal and provides institutional confidence for MFI partners.

Every collect() call emits:

event FeeCollected(
uint256 indexed batchTokenId,
uint256 amountUsdc,
uint256 totalCollectedToDate,
uint256 timestamp
);
event FeeDistributed(
address indexed recipient,
uint256 amountUsdc,
string purpose,
uint256 timestamp
);

These events are permanently readable on Mantle explorer and mirrored to Hedera HCS for the governance audit trail.