👉Getting started

The Madhouse API gives you access to the most powerful liquidity aggregator on Monad that routes swaps across multiple DEXs and protocols to guarantee most efficient trade execution for your users.

Why Integrate Madhouse?

  • Best Execution: Smart routing ensures your users always get the optimal price across all supported DEXs.

  • Revenue Sharing: Earn a percentage of aggregator fees on every trade routed through your app.

  • Plug-and-Play: Standardized REST endpoints (/quote, /tokens, /protocols) make integration seamless.

  • Optional Extra Fees: Add your own fee layer on top for additional monetization or rebates to your community.

  • Future-Proof: As new chains and protocols are added, you automatically benefit without extra work.

Revenue Model

Integrators benefit from two revenue streams:

  1. Referral Share of Madhouse Fees

    1. Every swap incurs a small aggregator fee.

    2. Integrators earn a percentage of that fee via their referrerAddress.

Example

  • User executes a $10,000 swap

  • Madhouse fee: 0.01% = $1

  • With a 30% rev-share, integrator earns $0.3

  1. Optional Additional Fees

    1. Integrators may add their own service fee on top of Madhouse’s base fee.

    2. This can be used to:

      1. Increase revenues,

      2. Subsidize/rebate costs to users,

      3. Or run a fee-free model relying only on the referral share.

Whitelisting Process

Whitelisting enables revenue attribution, higher rate limits, and access to partner features. The process is lightweight and modeled on industry standards.

Application

  • Submit a request with your project details and the payout wallet information.

Agreement on Terms

  • Revenue split percentage confirmed.

  • Decide if you’ll apply an additional fee.

Referrer Address Assignment

  • Integration & Testing

Integrate API endpoints:

  • /swap/v1/tokens → list supported tokens

  • /swap/v1/protocols → list supported DEXs

  • /swap/v1/quote → get swap routes & transaction data

Add your referrerAddress to each /quote call.

  • Test

  • Go-Live

  • Collect revenue

Once live, trades routed via your integration are automatically credited to your referrer address. Payouts are real-time based on direct on-chain share of fees.

Example Integration Flow

  • User requests swap in your app (e.g., 1 WMON → USDC)

  • Your app calls /swap/v1/quote with user inputs + your referrerAddress

  • Madhouse returns the best route, output amount, and transaction payload

  • Transaction is executed directly from the user’s wallet

  • Fees are split between Madhouse and your project

  • If you applied an extra fee, that goes directly to your wallet

Benefits of Being a Partner

  • Monetize traffic: Earn revenues on every swap routed through your app

  • Faster time-to-market: No need to build and maintain your own liquidity integrations

  • Simple integration: Just three endpoints to fetch tokens, protocols, and quotes

  • Analytics: Access dashboards to monitor swap volumes and revenues

  • Priority support: Direct access to Madhouse partner channels

Get Started

  1. Contact us on Discord to request whitelisting

  2. Receive your referrerAddress and revenue-sharing agreement

  3. Get started

Last updated