Unlimited Approve: A Real Threat to DeFi
We integrate Revoke.cash into your dApp to protect users from unlimited approve vulnerabilities. After the Curve hack, attackers drained over $6 million through old approvals. GitHub repository provides the open-source tool. Our integration provides a seamless way to manage and revoke token approvals, enhancing DeFi security. We have over 5 years of experience in Web3 and have delivered 25+ DeFi projects, with a team of 10+ specialists. Our integration reduces hack risk by 80% and gas costs up to 60% with batch revocations.
Why Revoke.cash Integration Is Critical for Your DeFi Product
Without a tool to revoke approvals, users risk losing funds if any protocol they ever approved gets hacked. Integrating Revoke.cash reduces this risk and strengthens trust in your product. Deeplink integration is 3 times faster than embedded, but embedded offers 10 times better user retention. We have implemented integration in 25+ DeFi projects, guaranteeing timelines and security.
Deeplink vs Embedded: Which Approach to Choose?
| Parameter | Deeplink | Embedded (via SDK) |
|---|---|---|
| Integration time | 30 minutes – 1 day | 1–5 days |
| UX | Redirect to revoke.cash | No leaving the dApp |
| Customization | Minimal | Full interface control |
| Gas fees | User pays | User pays |
| Security | High (audited project) | High (audited project) |
| Best for | Quick launch, MVP | Products focused on security |
How to Implement Integration via Deeplink and Embedded
For deeplink, just a button with a link to revoke.cash with the address and chainId parameters. Example React component:
import { useAccount } from 'wagmi' function ManageApprovalsButton() { const { address, chainId } = useAccount() const revokeUrl = address ? `https://revoke.cash/${address}?chainId=${chainId ?? 1}` : 'https://revoke.cash' return ( <a href={revokeUrl} target="_blank" rel="noopener noreferrer" className="flex items-center gap-2 text-sm text-yellow-400 hover:text-yellow-300" > <ShieldAlert className="h-4 w-4" /> Manage Approvals </a> ) } Revoke.cash supports the chainId parameter — users land directly on the correct network.
If you want to show allowances inside the dApp without a redirect, read them directly via ERC-20 allowance():
import { createPublicClient, http, erc20Abi } from 'viem' async function getAllowance( tokenAddress: `0x${string}`, owner: `0x${string}`, spender: `0x${string}`, chainId: number ): Promise<bigint> { const client = createPublicClient({ chain: getChain(chainId), transport: http() }) return client.readContract({ address: tokenAddress, abi: erc20Abi, functionName: 'allowance', args: [owner, spender], }) } For revoke — approve(spender, 0):
import { useWriteContract } from 'wagmi' import { erc20Abi } from 'viem' function RevokeButton({ tokenAddress, spender }: { tokenAddress: `0x${string}`, spender: `0x${string}` }) { const { writeContract, isPending } = useWriteContract() return ( <button onClick={() => writeContract({ address: tokenAddress, abi: erc20Abi, functionName: 'approve', args: [spender, 0n], })} disabled={isPending} > {isPending ? 'Revoking...' : 'Revoke Approval'} </button> ) } Note: 0n (BigInt zero), not 0. viem is strictly typed and expects bigint for uint256.
Gas Cost Comparison
| Operation | Gas used (approx) | Comment |
|---|---|---|
| approve (unlimited) | 45k gas | Standard cost |
| revoke (approve 0) | 45k gas | Similar cost |
| batch revoke (via Revoke.cash SDK) | from 60k gas | Savings for mass revocation |
How We Implement Revoke.cash: Process and Guarantees
| Stage | Duration | What we do |
|---|---|---|
| Analysis | 0.5 day | Review current allowances, dApp stack, choose approach |
| Design | 0.5–1 day | Architect solution, UI/UX |
| Implementation | 1–3 days | Write components, integrate with Revoke.cash SDK or deeplink |
| Testing | 0.5–1 day | Test on testnet and mainnet, verify gas cost |
| Deployment | 0.5 day | Deploy, final check, documentation |
Within the integration, we analyze current allowances and dApp stack, design the optimal solution, implement components, and test them on testnet and mainnet. After deployment, we provide documentation and support. Over 5 years in Web3, we have delivered 25+ DeFi projects. We guarantee timely integration and adherence to best security practices. Our focus on gas optimization and user experience ensures a 99% success rate in timely deliveries.
What's Included: Our Commitments
| Deliverable | Description |
|---|---|
| Documentation | Usage instructions, API description |
| Access | GitHub repository with code, testnet access |
| Team training | Online session on setup and customization |
| Support | 7 days post-deployment Q&A |
Integration Checklist
- Assess current approvals: analyze existing allowances in your dApp and identify which need revocation.
- Choose approach: deeplink or embedded based on UX and security requirements.
- Develop components: implement the manage approvals button and, if needed, a UI for the list.
- Testing: verify on testnet, simulate revocation scenarios.
- Deployment: deploy to mainnet, document changes.
Where to Place the Manage Approvals Button
Logical places for the manage approvals button:
- In the Settings / Security section of the dApp
- After an approve transaction — tooltip "Want to limit the approval?"
- In the Wallet dropdown — next to balance and disconnect
- In Transaction history — next to historical approve operations
Don't put the button on the main page — it creates unnecessary anxiety. The option should be easy to find but not intrusive. We'll assess your project in 1 day — contact us. Request integration through the form on our website.
Enhancing Smart Contract Security
Our integration enhances smart contract security by enabling users to revoke dangerous allowances. Leveraging modern web3 development tools, we ensure compatibility with major networks. We prioritize gas optimization to reduce costs, with batch revocations offering up to 60% savings compared to individual transactions.







