The canonical spec is EIP-4626 on eips.ethereum.org. It standardizes the interface for vaults that accept one underlying ERC-20 asset and issue shares against it.
Why a standard vault interface
Before ERC-4626, every yield vault, lending pool, and staking wrapper invented its own deposit/withdraw API, and every integration was bespoke. ERC-4626 fixed the interface:deposit(assets, receiver)/mint(shares, receiver)— put the underlying in, get shares out.withdraw(assets, receiver, owner)/redeem(shares, receiver, owner)— burn shares, get the underlying back.convertToShares(assets)/convertToAssets(shares)— the exchange rate, readable on-chain by anyone.totalAssets()— the vault’s holdings, auditable at any time.
SohoPay’s customizations
SohoPay’s vault follows ERC-4626 accounting but deliberately restricts three behaviors:
The reasons:
- Non-transferable shares keep collateral attributable. A credit line is underwritten against a specific operator’s deposit; if shares could move, the collateral backing an agent’s spending could walk away mid-flight.
- Withdrawal gates are the solvency rule. While an agent has an outstanding borrowed balance, the collateral covering it is locked. A withdrawal that would leave credit unbacked reverts on-chain, and the API returns
WITHDRAWAL_GATED(409). Repay or settle the outstanding balance first — see Vault Funding. - LP yield comes from the 5% per-transaction fee charged to the operator’s credit line: 3% flows to vault LPs, 2% is protocol revenue (see Fees).
Vault = collateral pool
The vault is not a savings product bolted onto SohoPay — it is the credit system’s backing. Your vault balance is your borrowing capacity: When your agents spend, they draw against credit backed by your deposit; merchants are always paid in full at settlement, and fees come out of your credit line, not the merchant’s payout. How credit limits map onto collateral is covered in Agent Setup.Example: deposit and withdraw flow
1
Deposit USDC
Approve the vault for your USDC, then deposit. You receive shares at the current exchange rate:Your borrowing capacity increases by the deposited amount; the dashboard reflects it under Vault → Collateral.
2
Agents spend against it
Credit lines you attach to agents draw on this collateral. As agents pay merchants, outstanding credit accrues and a matching portion of your collateral is gated.
3
Accrue yield
3% of every fee across the protocol is distributed to LPs, so
convertToAssets(shares) drifts upward over time — your shares redeem for more USDC than you deposited.4
Withdraw
With no outstanding credit, redeem freely:With credit outstanding, a withdrawal that would unback it reverts; via the API you’ll see
WITHDRAWAL_GATED (409). See error handling for recovery.On-chain verifiability
Everything above is public state on Base. On Basescan (or Sepolia Basescan for sandbox) you can readtotalAssets(), your share balance, the share/asset exchange rate, and every deposit, withdrawal, and yield distribution event — no SohoPay API required. This is the trust model in practice: collateral claims are checkable by anyone (see Trust Model).
SohoPay is pre-mainnet. The mainnet vault address will be published in the dashboard and docs at launch; sandbox vault addresses are visible today at staging.sohopay.xyz.
Next steps
Vault Funding
Step-by-step guide to funding your vault and sizing collateral.
Fees
The full fee model: 5% per transaction, 3% LP yield, 2% protocol.
Trust Model
Who gets paid, who pays fees, and what’s enforced on-chain.

