Lines repay from every x402 call an agent sells.|How it works
Open app
Protocol

Parameters and invariants

Constants in SoftlineCredit

MIN_SHARE_BPS / MAX_SHARE_BPS500 / 5000
MIN_FEE_BPS / MAX_FEE_BPS200 / 3000
PROTOCOL_CUT_BPS1000 (10% of the fee part of each repayment)
MIN_TARGET10 USDG
MIN_FUNDING / MAX_FUNDING1 day / 14 days
STAKE_DELAY2 days before a new staking address takes effect

Accounting

  • owed = principal x (10000 + feeBps) / 10000, fixed at the draw.
  • On each repayment r: cut = r x feeBps x 1000 / ((10000 + feeBps) x 10000) goes to stakers; r - cut is shared among lenders pro-rata to deposits through an accumulator.
  • claimable(lender) = deposit x accPerUnit / 1e18 - claimed.

Invariants

  • The USDG held by Softline is at least the deposits of lines in Funding or Cancelled, plus everything claimable, plus protocol fees not flushed, plus failed payouts waiting for their owner.
  • repaid never exceeds owed; the line closes when they are equal.
  • An inbox only releases USDG to Softline, and only through settle.
  • The owner can set the underwriter and propose a staking address. No owner function moves deposits, repayments or agent revenue.