All projects

Autosig

Autonomous on-chain portfolio rebalancing powered by Chainlink CRE and EIP-7702

DeFi & Tokenization Tenderly

What it is

AutoSig eliminates the manual effort of maintaining a target portfolio allocation on-chain. Users connect via Privy, upgrade their EOA to an EIP-7702 smart account (Kernel v3.1), and set their desired allocation percentages (e.g., ETH 62%, cbBTC 24%, USDC 8%, DAI 6%). A Chainlink CRE workflow, triggered every 30 seconds, automatically discovers all registered users, reads their on-chain allocations, computes drift from target, plans optimal swaps, routes them through the 1inch Aggregation Protocol, and executes everything atomically in a single batch transaction on the user's smart account -- all without the user signing individual swap transactions.
The key innovation is combining EIP-7702 (EOA-to-smart-account upgrade without deploying a new contract) with Chainlink CRE's off-chain computation and on-chain execution model. Users retain full custody via their ECDSA root validator while granting the CRE workflow limited executor permissions to rebalance on their behalf. The 1inch API key is protected via CRE's Confidential HTTP capability and never exposed on-chain.

How it Works

  • Frontend: Next.js 15 + React 19 + TailwindCSS v4, Privy embedded wallets for onboarding, wagmi/viem for contract interactions
  • Smart Contracts: Custom Solidity contracts deployed on Base via Remix -- CREAgentExecutor (ERC-7579 executor module for Kernel v3.1) and TradeRegistry (on-chain allocation storage)
  • CRE Workflow: TypeScript workflow using @chainlink/cre-sdk -- CronCapability for scheduling, EVMClient for on-chain reads/writes, ConfidentialHTTPClient for 1inch API routing with secret injection via vaultDonSecrets
  • API Server: Bun HTTP server aggregating on-chain user discovery (getLogs), token balances (multicall), and USD prices (CoinGecko) into a single endpoint to stay within CRE's 5-call confidential HTTP budget
  • EIP-7702: Users sign an authorization designating Kernel v3.1 as their code, submitted by a relay account. The account is then initialized with the ECDSA validator and executor module in one transaction
  • Testing: Tenderly Virtual TestNet (Base fork) with full transaction simulation and contract state management

Links

Created by

  • Chris Gachau