Skip to content
GitHub

Peer liquidity

Peer liquidity is the line of credit you extend to a peer, denominated in your agreed upon asset. A peer’s liquidity account balance represents the amount of credit the peer still has available to them.

A peer’s liquidity increases when payments are made to the peer and decreases when payments are made from the peer. For example, if a customer of your peer sends your customer a payment of $20 USD, then your peer’s liquidity account decreases by 20.

If a peer’s liquidity is insufficient (e.g., they’ve used up their allotted credit line), transactions initiated from the peer will fail. Once a peer’s liquidity is used up, you should settle with your peer and reset their liquidity. Deposit and withdraw peer liquidity as necessary, based on your risk profile.

For more information about how Rafiki handles liquidity, see the Accounting concepts page and the low peer liquidity section of the webhook events page.

Manage peer liquidity using Rafiki Admin

You can deposit and withdraw peer liquidity through the Rafiki Admin application’s Peers screen.

Manage peer liquidity using the Backend Admin API

Deposit peer liquidity

mutation DepositPeerLiquidity($input: DepositPeerLiquidityInput!) {
depositPeerLiquidity(input: $input) {
success
}
}

Withdraw peer liquidity

mutation CreatePeerLiquidityWithdrawal($input: CreatePeerLiquidityWithdrawalInput!) {
createPeerLiquidityWithdrawal(input: $input) {
success
}
}