Testnet demo. Test banks and test money only.

Contents and search

KredoFi docs

How it works

The path from a bank login to a loan, step by step.

How a KredoFi score and loan flowThe browser gets a one-time token from Plaid and asks the KredoFi contract for a score. The contract asks OutLayer to run the pinned scorer inside Intel TDX. The scorer fetches the bank history from Plaid, scores it and returns only a band, a score, an income cap, a fingerprint and a sealed name to the contract's private callback. The borrower then borrows from and repays to the lender pool; the reserve pays losses first.Your browserPlaid Link loginone-time public tokenfresh reply keyKredoFi contractrequest_scorepins the scorer hashaccepts only on_scoreEnclave (Intel TDX)pinned scorer WASMfetches from Plaidfive rules, seals namePlaidbank history,read-only, removedafter one fetchOn-chain resultband, score, income capfingerprint, sealed nameno transactionsLender poolborrow, repayreserve pays losses firstlenders + treasury splittokenrunfetchone linelimit

#1. Connect a bank

The browser opens Plaid Link. You log in to your bank inside Plaid's window; KredoFi gets a one-time public token, never your password.

#2. Ask for a score

On mainnet, your account calls request_score on the KredoFi contract with that token and a fresh public key generated in your browser, and attaches at least 0.01 NEAR for the OutLayer fee (the unused part is refunded to you). The contract asks OutLayer to run one exact scorer program, pinned by its SHA-256.

#3. The scorer runs inside the enclave

Inside Intel TDX, the scorer:

  1. exchanges the token with Plaid and fetches up to two years of transactions;
  2. picks your checking account (or the first deposit account) and keeps the last 6 full calendar months;
  3. applies the five rules and works out a band, a score and an income cap;
  4. computes a keyed fingerprint of your bank identity, so one bank identity can back only one borrower;
  5. seals your name to a key only the scorer holds, and seals the rule results to your browser's key;
  6. removes the bank connection at Plaid.

Nothing else leaves: no transactions, balances or names.

#4. The contract checks and stores

The answer can only arrive in the contract's own callback (on_score), for its own pending request. The contract checks the output's shape and fields, that it is for you, and that the fingerprint isn't already used by someone else, then stores the score for 30 days. A failed or empty answer changes nothing.

#5. Borrow, repay, grow

borrow sends USDC from the pool to you. Repaying is one transfer of the exact amount due. Repay after the minimum hold, on a loan of at least half your limit, and your level goes up. See For borrowers.

#6. If a loan isn't repaid

After the due date plus the grace period, anyone can mark the loan as defaulted. The reserve pays the pool back first, the borrower can never borrow again, and the sealed name is re-sealed by the scorer to the recovery partner's key. See Security.

#On the testnet demo

The same steps run, but the scorer runs on our server (Dev mode) and the server submits its output; a relayer pays all fees for no-wallet demo accounts. See Testnet vs mainnet.