Fakturindocs

Security and trust model

Who can do what, what each party has to trust, the threats Fakturin addresses and the ones it does not.

Permissions

ActionWho may callGuard
requestVerificationAny wallet passing the ACE seller validator, not flaggedisSeller, sellerDefaulted
fulfillVerificationVERIFIER_ROLE: the CRE receiver and the demo relayerAccessControl
FakturVerifierReceiver.onReportChainlink forwarder onlyOnlyForwarder
FakturKeeper.onReportChainlink forwarder onlyOnlyForwarder
deposit / mintWallets passing the ACE funder validatormaxDeposit = 0 otherwise
repayAnyone (pays N)state Active
cancelFundingAnyoneafter fundingDeadline
markDefaultAnyoneafter dueDate + gracePeriod
redeem / withdrawShare ownerstate closed
onFunded … onFundingFailedThe invoice's own vaultonlyVaultOf
NFT.mint / burnRegistryREGISTRY_ROLE
setParameters, setIdentity, setTreasuryAdminADMIN_ROLE
ACE registerIdentity / registerCredentialAuthorized issuerPolicyEngine + OnlyAuthorizedSenderPolicy

What each party trusts

PartyTrustsDoes not need to trust
LenderThe PJAP data, the KYC/KYB issuer, the seller's offchain recourse, the contractsFakturin's server with money, other lenders
SellerThe contracts, the price shown before submittingLenders, Fakturin's server with money
Fakturin adminCan change parameters for future invoices only; cannot move vault funds

Threats

ThreatMitigation
Same invoice financed twiceRegistry keyed by national number; financed numbers can never be resubmitted; the NFT is locked in one vault.
Someone finances another business's invoiceNPWP hash from PJAP must equal the wallet's ACE PKP credential (SELLER_MISMATCH).
Fake verification resultOnly VERIFIER_ROLE can write; the receiver accepts only the Chainlink forwarder; in production the result needs DON consensus.
Seller does not repayHoldback, public default flag, no further submissions, per-seller and per-buyer limits, offchain recourse.
Concentration on one buyerPer-buyer-NPWP limit across all sellers.
Credential forged or staleOnly the authorized issuer can write; revocation applies on the next call.
ReentrancyReentrancyGuard on vault entry points; checks-effects-interactions; state set before transfers.
Unlimited approvalsThe app requests the exact amount for every approve.
Keeper griefingClosing is permissionless and idempotent; each close has a fixed gas budget; failures do not block others.
Admin abuseParameters only affect new quotes; setParameters rejects an advance above the target; vault terms are immutable.

Not addressed

  • Delivery and collusion. A valid Faktur Pajak proves a taxed sale was declared, not that goods arrived. A seller and buyer acting together can still create a fake trade, though it costs them VAT and leaves a tax trail.
  • Data source integrity. The PJAP and KYC/KYB providers are trusted. They are simulated in this demo.
  • Audit. The contracts have a Foundry test suite (37 tests covering every user story and rejection path) but no external audit.
  • Legal status of shares. Co-funding claims may be treated as securities; shares are non-transferable and KYC-gated, but this needs legal review.

Privacy

Onchain data is limited to invoice IDs, NPWP hashes, CCIDs, amounts, dates and statuses. Names, NPWPs and documents never touch the chain. Note that an NPWP hash is not secret against someone who already knows the NPWP: it hides the number from the public, not from a party that can guess it.

On this page