TechnologyPapaya Protocol

Add recurring stablecoin payments to your product.

Papaya Protocol handles subscriptions, streaming balances and onchain collection.

Architecture

Many subscribers in. One contract. Efficient collection out.

  1. 01

    Many subscribers

    Every payer holds a streaming balance and any number of subscriptions. Nothing is batched, scheduled or polled — each stream is a rate and a start time.

    One subscription = one rate per second

  2. 02

    Papaya Protocol

    All streams resolve against one contract per network and asset. Balances are derived from time, so a million subscribers cost the same to account for as one.

    balance = old balance + rate × time

  3. 03

    Efficient recurring collection

    Recipients see funds accrue in real time and withdraw when they choose. Projects take their fee at the protocol level, without a second payment leg.

    O(1) per account, independent of subscriber count

Many subscribers

Integration

Integrate at the level you need.

Use the TypeScript SDK for wallets and apps, or call the contracts directly from your own stack. Both talk to the same protocol.

SDK
@papaya_fi/sdk on npm, ethers v6 as a peer. Typed methods for deposits, subscriptions, payments and balances; gasless variants via BySig.
Smart contracts directly
One contract per network and asset. Deposit, subscribe, unsubscribe, withdraw — from any language that can sign a transaction.
subscribe.ts
import { ethers } from "ethers";
import { PapayaSDK } from "@papaya_fi/sdk";

const provider = new ethers.BrowserProvider(window.ethereum);
const signer = await provider.getSigner();

// One instance per network + stablecoin
const papaya = PapayaSDK.create(signer, "base", "USDC");

// Fund the streaming balance
await (await papaya.deposit(50)).wait();

// Stream 10 USDC per month to a recipient
await (await papaya.subscribe("0xRecipient…", 10)).wait();

// The balance is a function of time — read it, no transaction needed
const balance = await papaya.balanceOf();

Core primitives

Four things the protocol knows.

  • 01

    Subscriptions

    A subscription is a stream: tokens per second from a payer to a recipient, scoped to a project. Create it once; it runs until it is cancelled or the balance runs out.

    • subscribe
    • unsubscribe
    • StreamCreated
    • StreamRevoked
  • 02

    Real-time balances

    Balances are computed, not settled per period. old balance + rate × time gives every account its current value in O(1), for any number of subscribers.

    • balanceOf
    • deposit
    • withdraw
    • pay
  • 03

    Projects / fees

    A project is your integration inside the protocol. It owns a project ID, a default fee in basis points, and per-user overrides when you need them.

    • claimProjectId
    • setDefaultSettings
    • setSettingsForUser
  • 04

    Sponsored interactions

    Users sign; someone else pays gas. Signed calls, sponsored calls and permit-and-call let your product absorb transaction costs and onboarding friction.

    • bySig
    • permitAndCall
    • multicall

Networks / assets

9 networks. Three stablecoins.

Current support as listed in the protocol docs. Availability of each asset varies by network.

Stablecoin availability by network
NetworkUSDTUSDCPYUSD
Ethereummainnetyesyesyes
Basebasenoyesno
Polygonpolygonyesyesno
Arbitrumarbitrumyesyesno
BNB Chainbscyesyesno
Avalancheavalancheyesyesno
Scrollscrollyesyesno
zkSynczksyncyesnono
Seiseiyesyesno

Build recurring payments with Papaya.