The protocol

How the pool works, in full.

The model, what a default does, the score, the invariants and every parameter of the pool, read from the contracts. § 06 marks what is live and what comes next.

§ 01Model

One pool of USDG. Every agent's line is vouched by one backer, all of it out of that backer's own stake. If a line defaults, the loss comes out of the stake of the backer who vouched it.

accountingCreditPool.sol
backing(r)    = value of r's locked pool shares     // a backer's stake
free(r)       = backing(r) − delegatedOut(r) − feeLocked(r)
available(a)  = delegatedIn(a) − principalOut(a)     // from its one sponsor

vouch(r → a, x):  require x ≤ free(r) ;  needs the owner's signed consent
                   delegatedOut(r) += x ;  delegatedIn(a) += x

borrow(a, P):     require minLoan ≤ P ≤ available(a)
                   principalOut(a) += P ;  fee = P · feeBps · term / 30d

repay(a, P+fee): fee → lenders 50% · sponsor(a) 25% · reserve 25%

lender

Deposits USDG, holds shares, earns 50% of every base fee. Every line is fully backed by a backer's locked shares, so withdrawals never wait for agents to repay.

root sponsor

Locks USDG as pool shares and vouches lines out of them. The stake earns the lenders' share of fees and pays when a line it vouched defaults.

agent

An ERC-8004 identity. Borrows $5 to $500 for 1 to 30 days at 1% per 30 days, within the line its sponsor vouched. Repaying builds its record, not its line.

consent

An EIP-712 signature from the agent's NFT owner, naming one sponsor and the most premium it accepts. Nobody gets a line without having signed for it.

§ 02Loan lifecycle

Four transitions. The last one is a default, where the backer pays.

Open  ── repay() before markDefault() ──▶ Repaid     // score rises, sponsor takes 25% of fee
  │
  └── dueAt + 3d passed ──▶ Defaulted ──▶ Backer pays  // its shares burn, same transaction

markDefault():
  require now > defaultableAt
  burn ⌈(P + fee) · totalShares / totalAssets⌉ of sponsor's locked shares
  defaulted(a) = true                             // for good: score 0, no new line
  share price: never falls                        // lenders are untouched

§ 03Score

Six terms over the on-chain record, 0 to 1000. A pure function of the agent's credit report; nobody sets or adjusts it by hand.

TermWhat it measuresMax
Risk timedollar-days repaid on time300
Seasoned loansloans of a week or longer200
Backingstake behind the line150
Incomex402 payments it received150
Agedays since first repayment100
Recourseowner collateral at stake100

Less 10 per late repayment and 75 per vouched default. A default sets the score to 0.

§ 04Invariants

Checked by the invariant suite before every deploy.

totalBadDebt          == 0
sharePrice(t+1)       ≥ sharePrice(t)
Σ delegatedOut(r)     ≤ Σ backing(r)
principalOut(a)       ≤ delegatedIn(a)

§ 05Parameters

ParameterMeaningValue
feeBpsfee per 30 days100 (1%)
minLoansmallest loan5 USDG
maxLoanlargest loan500 USDG
gracetime after due before default3 days
earlyExitFeewithdrawal within 7 days0.5%
bondrefundable treasury-line bond5 USDG

§ 06Live and next

Pool, vouching, borrow and repaylive
$TALLY as owner collaterallive
Stock-token lineslive
Treasury $TALLY behind linesnext
Outside auditnext