Skip to main content
POST
Deposits the market’s borrow asset into the lending pool directly. The depositor receives LP shares at the current share price, and those shares accrue value as borrowers pay interest. Two transactions are required: an ERC-20 approval for exactly the amount, then the deposit. Both come back as ordered steps.

Who can deposit directly

On current markets only two kinds of address can call addLiquidity: the market’s operator wallet and the vaults the market admin registered. The operator wallet starts as the wallet that took the lender-of-record role and moves only through Rotate Operator Wallet. Read it as operatorWallet on Get Market Metrics, where vaultOnlyLiquidity: true marks a market under this rule. Every other liquidity provider funds the market through one of the operator’s vaults, with Deposit or Deposit to Vault. The vault checks the depositor against its own register and the provider register of each market it funds. A direct deposit from any other wallet reverts on-chain, so the API refuses it first with LIQUIDITY_VAULT_ONLY. No liquidity can be added to a MARKET-priced market until its borrower register qualifies as a professional gate: at least one verification profile admits wallets to it, and every profile that does, on any instance of the market’s network and environment, is limited to professional clients and has its admissions signed by its own instance. Until then a deposit is refused with 409 PROFESSIONAL_BORROWER_GATE_REQUIRED, also from the operator wallet. The check runs after the depositor checks, and the market contract does not apply it. See Professional borrowers. A market still running an implementation from before this rule answers with its own gate instead. LIQUIDITY_OPERATOR_ONLY means it takes liquidity only from its lender of record and the providers it admitted. IDENTITY_REGISTRY_REQUIRED means it is open to third parties but has no provider register yet. IDENTITY_NOT_VERIFIED means the wallet is not verified on the register the market checks, and ELIGIBILITY_REMOVAL_PENDING that its admission to that register is waiting for removal.

Path Parameters

string
required
The market’s record ID, as id on List Markets, not its contract address. See Market IDs.

Body Parameters

string
Amount to deposit as a positive decimal string, for example "250000". Denominated in the market’s borrow asset and parsed at its decimals. Required when building calldata. The confirm call needs only txHash: the recorded amount comes from the mined transaction, and an amount sent alongside is validated but not used.
string
Wallet that will sign the deposit. Required when building calldata on a current market: without it the deposit cannot be checked against the operator wallet and the registered vaults, and the call returns PROVIDER_REQUIRED. On a market running an earlier implementation it is optional, and supplying it runs that market’s own gate before a transaction is offered. When supplied, the API also checks that the wallet holds amount of the borrow asset, and refuses with INSUFFICIENT_BALANCE when it holds less. Not needed on the confirm call, where the provider is taken from the mined transaction.
string
Hash of the transaction you broadcast for this operation. Send it to confirm the transaction and record the result. Omit it to receive the calldata.

Response Fields

object

First-deposit minimum

The first deposit into an empty pool must be at least 1,000 whole units of the borrow asset, for example 1,000 USDC. Current markets expose the figure as minInitialDeposit(). A market first deployed before per-asset scaling existed applies 1,000,000,000 smallest units, which is 1,000 of a 6-decimal asset. The same floor applies to the deposit that recapitalises a pool whose value bad debt has fully consumed. It is a dust floor on the first share issue. Later deposits have no minimum beyond the token’s own precision.
The minimum is checked when the calldata is built, not when you confirm. Broadcasting an undersized first deposit reverts on-chain rather than returning BELOW_MIN_DEPOSIT. totalShares on Get Market Metrics reads 0.0 on an empty pool.
Depositors receive shares at the current share price, which already includes accrued interest. Depositing does not dilute existing providers.

Error Codes

A deposit that reached the market through another contract, such as a multisig wallet, confirms from the market’s LiquidityAdded event in the receipt. Confirming with txHash can also return any transaction verification error.