Skip to main content

Overview

Darex revolutionizes DeFi by enabling single-transaction, cross-asset deposits to any lending protocol. Here’s how we make it possible.

Security Features

Atomic Execution

All steps succeed or fail together - no partial state

Reentrancy Protection

All external calls protected with reentrancy guards

Slippage Control

User can specify max slippage for swaps

Access Control

Only authorized adapters can register instruments

Gas Optimization

Darex is optimized for minimal gas costs:
  • Packed Storage: Instrument IDs encode chain ID + protocol data in 32 bytes
  • Single Transaction: All operations in one tx (no approve + deposit sequence)
  • Minimal Lookups: O(1) instrument and pool queries
  • Efficient Swaps: Leverages Uniswap V4’s efficient swap routing
Average gas cost: ~180k gas for deposit with swap vs ~300k gas for manual swap + approve + deposit

Next Steps