Contract Details
Tech Stack
Solidity ^0.8.24 OpenZeppelin v5 Foundry TypeScript ethers.js
Chains
Ethereum Arbitrum Base Optimism
Description
Automated rebalancing system for tokenized indexes. Solidity trade executor with configurable triggers (time-based, drift-based, oracle-triggered) and TypeScript keeper bot for off-chain monitoring and execution. Supports DEX aggregator integration for optimal trade routing.
Features
- ✓ On-chain trade executor with slippage protection
- ✓ Three trigger modes: time, drift, oracle
- ✓ Configurable drift bounds per component (basis points)
- ✓ TypeScript keeper bot with cron scheduling
- ✓ DEX aggregator integration (0x, 1inch)
- ✓ Rebalance preview (dry-run) for gas estimation
- ✓ Event logging for all rebalance operations
- ✓ Emergency pause with partial rebalance support
- ✓ Gas-optimized batch swaps
- ✓ Full Foundry + Jest test suites
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Rebalance Engine /// @notice Automated rebalancing with configurable triggers and bounds. contract RebalanceEngine { address public immutable owner; uint256 public constant VERSION = 1; event Initialized(address indexed deployer); constructor() { owner = msg.sender; emit Initialized(msg.sender); } // ... full implementation in purchased package }