Partner Fee
CoW Protocol allows partners and integrators to collect fees on orders placed through their applications. Partner fees can be configured as a percentage of volume, surplus, or price improvement.Overview
Partner fees enable:- Revenue sharing: Collect fees from orders placed through your app
- Flexible fee structures: Choose from volume-based, surplus-based, or price improvement fees
- Transparent fee collection: Fees are automatically calculated and deducted
- Multiple fee tiers: Support different fee levels for different user segments
Fee Types
Volume-Based Fee (volumeBps)
A fixed percentage of the order’s sell or buy amount:Volume-based fees are capped at 100 BPS (1%) at the protocol level.
Surplus-Based Fee (surplusBps)
A percentage of the order’s surplus (the difference between limit price and execution price):Price Improvement Fee (priceImprovementBps)
A percentage of the price improvement over the best available market price:Configuration
Single Fee Structure
Multiple Fee Tiers
You can specify multiple fee structures, and the protocol will choose the most beneficial one:Usage with TradingSdk
Get Quote with Partner Fee
Post Order with Partner Fee
Limit Orders with Partner Fee
Partner Fee in App Data
Partner fees are stored in the order’s app data:Fee Calculation
For Sell Orders
Partner fee is deducted from the buy amount:For Buy Orders
Partner fee is added to the sell amount:Extracting Partner Fee from Quote
Use the utility function to get partner fee BPS:Complete Example
Best Practices
Choose appropriate fee type
- Use volumeBps for predictable, transparent fees
- Use surplusBps to share in the value created
- Use priceImprovementBps to incentivize better execution
- Combine multiple types for optimal fee capture
Set reasonable fee rates
Display fees to users
Always show users the fee they’re paying:Use surplus-based fees wisely
Surplus-based fees can be zero if there’s no positive slippage:Fee Recipient Management
Multiple Recipients
Support different fee recipients for different user tiers:Fee Splitter Contract
Use a fee splitter to distribute fees:Monitoring Fee Collection
Next Steps
- Hooks - Execute custom logic before and after orders
- TWAP Orders - Split large orders over time