npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@decaflow/privacy-sdk

v1.0.2

Published

MEV Protection SDK for DeFi Protocols - Add privacy-protected swaps in 5 minutes

Readme

🔒 DecaFlow Privacy SDK

MEV Protection for Your Protocol in 5 Minutes

npm version License: MIT Downloads Stars

Open-source SDK for integrating MEV protection into DeFi protocols. Multi-language support. Free forever.


🚀 Quick Start

TypeScript/JavaScript

npm install @decaflow/privacy-sdk
# or
yarn add @decaflow/privacy-sdk
import { DecaFlowSDK } from '@decaflow/privacy-sdk';

const sdk = new DecaFlowSDK({ apiKey: 'your_key' });

const quote = await sdk.getPrivacySwapQuote({
  tokenIn: '0x...',
  tokenOut: '0x...',
  amount: '1000000000000000000'
});

await sdk.executePrivacySwap(quote);

Python

pip install decaflow-sdk
from decaflow import DecaFlowClient

client = DecaFlowClient(api_key="your_key")

quote = client.get_privacy_swap_quote(
    token_in="0x...",
    token_out="0x...",
    amount="1000000000000000000"
)

client.execute_privacy_swap(quote)

Solidity

import "@decaflow/contracts/interfaces/IPrivacyRouter.sol";

contract YourProtocol {
    IPrivacyRouter private router;
    
    function swap(address tokenIn, address tokenOut, uint256 amount) external {
        router.privacySwap(tokenIn, tokenOut, amount, msg.sender);
    }
}

✨ Features

  • 🔐 MEV Protection: Built-in protection against frontrunning, sandwich attacks, and other MEV exploits
  • 🌐 Multi-Chain: Supports Arbitrum, Base, Ethereum, Polygon, Avalanche, Optimism
  • ⚡ Fast Integration: Get up and running in less than 5 minutes
  • 🎯 Real-time Risk Scoring: Automatic MEV risk assessment for every transaction
  • 🔄 CoW Protocol Integration: Leverages CoW Protocol for optimal execution
  • 📊 Analytics: Track MEV savings and protection metrics
  • 🆓 Free Forever: Full functionality with no usage limits
  • 🛠️ Zero Maintenance: Automatic updates and managed infrastructure

📖 Documentation


🎯 Use Cases

DEXs & Aggregators

Protect your users from MEV attacks and improve execution quality

Lending Protocols

Prevent liquidation frontrunning and protect borrowers

Wallets

Offer built-in MEV protection for all swaps

dApps

Add privacy layer to any DeFi interaction


💡 Examples

React Hook

import { usePrivacySwap } from '@decaflow/react';

function SwapComponent() {
  const { quote, execute, loading } = usePrivacySwap({
    tokenIn: WETH_ADDRESS,
    tokenOut: USDC_ADDRESS,
    amount: '1000000000000000000'
  });

  return (
    <button onClick={execute} disabled={loading}>
      Swap with MEV Protection
    </button>
  );
}

Custom Risk Threshold

const sdk = new DecaFlowSDK({ 
  apiKey: 'your_key',
  riskThreshold: 'high' // 'low', 'medium', 'high'
});

const quote = await sdk.getPrivacySwapQuote({
  tokenIn: WETH_ADDRESS,
  tokenOut: USDC_ADDRESS,
  amount: '1000000000000000000',
  slippageBps: 50 // 0.5%
});

console.log(`MEV Risk Score: ${quote.mevRiskScore}/100`);
console.log(`Estimated MEV Savings: $${quote.estimatedSavings}`);

Batch Transactions

const quotes = await sdk.getBatchPrivacySwapQuotes([
  { tokenIn: WETH, tokenOut: USDC, amount: '1000000000' },
  { tokenIn: USDC, tokenOut: DAI, amount: '1000000000' }
]);

await sdk.executeBatchPrivacySwaps(quotes);

🏆 Who's Using DecaFlow

Be the first! Join the first wave of protocols protecting their users from MEV.

Want to be featured here? Open a PR after integrating DecaFlow.


💰 Pricing

Free (Forever)

  • ✅ Full functionality
  • ✅ Unlimited usage
  • ✅ Community support
  • ✅ "Powered by DecaFlow" badge

Premium ($500/mo)

  • ✅ White-label (remove branding)
  • ✅ Priority support (24hr SLA)
  • ✅ Custom routing logic
  • ✅ Advanced analytics

Enterprise (Custom)

  • ✅ Dedicated infrastructure
  • ✅ Custom features
  • ✅ SLA guarantees
  • ✅ Co-marketing support

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

git clone https://github.com/decaflow/privacy-sdk.git
cd privacy-sdk
npm install
npm run build
npm test

📊 Performance

| Metric | Value | |--------|-------| | Average Integration Time | < 5 minutes | | API Response Time | < 100ms | | Uptime SLA | 99.9% | | Chains Supported | 6 (expanding) | | Average MEV Savings | ~2.8% per swap |


🔒 Security

  • Audited by: [Audit firm TBD]
  • Bug Bounty: Up to $50,000 for critical vulnerabilities
  • No private key exposure: All transactions signed client-side
  • Open source: Full transparency

Report security issues to: [email protected]


📈 MEV Problem Statistics

  • $6.24M MEV extracted on Arbitrum (last 30 days)
  • 188,000+ transactions affected
  • $33 average loss per victim
  • Growing exponentially across all chains

Your users are losing money to MEV bots. Protect them with DecaFlow.


🛣️ Roadmap

  • [x] TypeScript/JavaScript SDK
  • [x] Python SDK
  • [x] Solidity contracts
  • [x] React hooks
  • [ ] Vue composables
  • [ ] Rust SDK
  • [ ] Go SDK
  • [ ] Advanced routing strategies
  • [ ] Cross-chain MEV protection
  • [ ] Custom RPC endpoint
  • [ ] Mobile SDKs (iOS/Android)

📞 Support


📄 License

MIT License - see LICENSE for details


🌟 Star History

Star History Chart


Get StartedView DocsExamplesBook Call

Made with ❤️ by the DecaFlow team