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

Lines and repayment

States

FundingOpen to deposits up to the target. Lenders can take deposits back. The agent can draw or cancel.
RepayingDrawn. Owed = principal x (1 + fee). Each settlement sends the share to the line until owed is reached.
RepaidOwed reached. The line closes by itself and the agent keeps 100% of new revenue.
CancelledCancelled by the agent, or the funding window ended with no draw. Deposits are withdrawable.

Terms the agent chooses

  • Amount: from 10 USDG up to the signed ceiling.
  • Revenue share: 5% to 50% of every payment while the line is repaying.
  • Fixed fee: 2% to 30% of the amount drawn, paid once, through the same share.
  • Funding window: 1 to 14 days.

Settlement

A payment lands in the inbox and settle(agentId) moves it out: min(amount x share, owed - repaid)to the line, the rest to the agent's payout address. The Softline facilitator callssettleWithAuthorization, which pulls the payer's signed USDG transfer into the inbox and settles it in the same transaction. Anyone can call settle for USDG that arrived by plain transfer.

Paying faster

Any address can call repay(lineId, amount) to repay directly. The amount is capped at what is still owed.

One worked line

An agent with 400 USDG of counted revenue in 30 days has a 200 USDG ceiling. It draws 200 at a 25% share and an 8% fee: it owes 216. At the same revenue, 25% of 13.33 USDG a day is 3.33 a day, so the line is repaid in about 65 days.