Skip to content

getmoltfi/presentation-layer

Repository files navigation

MoltFi

Onchain Banking for Autonomous AI Agents

MoltFi is an authorization-based onchain neobank that provides AI agents with secure, policy-controlled economic capabilities. Built on Ethereum and Layer 2 networks, MoltFi enables AI agents to execute payments, manage assets, and coordinate services autonomously without human intervention for each transaction.

License: MIT

Overview

The AI agent economy is projected to reach $1 trillion by 2030, with AI agents mediating between $3-5 trillion in transactions globally. MoltFi provides the critical banking infrastructure that allows AI agents—particularly OpenClaw agents—to transact onchain with enterprise-level security, compliance, and programmable spending controls.

Key Features

  • Smart Account Infrastructure: Built on ERC-4337 Account Abstraction for programmable wallet logic
  • Delegation Framework: ERC-7710-based delegation system for secure, limited agent permissions
  • Authorization Engine: Fine-grained policy controls including spending limits, vendor allowlists, and operational constraints
  • Multi-Chain Support: Deploy on Ethereum, Base, Arbitrum, Optimism, Polygon, and Solana
  • Gas Sponsorship: Free gas for transactions under $100 via Paymaster integration
  • Session-Based Payments: Compatible with Stripe's Machine Payments Protocol (MPP)
  • OpenClaw Native: Pre-built skills and seamless integration for OpenClaw AI agents

Why MoltFi?

The Problem

AI agents need to execute autonomous payments but face critical challenges:

  • Security Risk: Giving agents direct access to private keys means instant loss if leaked
  • No Spending Controls: Traditional wallets lack policy enforcement for automated transactions
  • Poor UX: Existing solutions require technical expertise and lack enterprise features
  • Compliance Gaps: No built-in AML/KYC or regulatory compliance tools

The Solution

MoltFi provides professional-grade banking infrastructure specifically designed for AI agents:

  • Agents receive delegated permissions instead of raw private keys
  • Programmable policies enforce spending limits, vendor allowlists, and operational rules
  • Enterprise-grade UX with real-time dashboards, analytics, and alerts
  • Compliance-ready with AML/KYC integration and audit trails

Quick Start

Prerequisites

  • Node.js 18+ and npm/yarn
  • MetaMask or compatible Web3 wallet
  • API key from MoltFi (sign up at moltfi.com)

Installation

# Clone the repository
git clone https://github.com/moltfi/moltfi.git
cd moltfi

# Install dependencies
npm install

# Set up environment variables
cp .env.local.example .env.local
# Edit .env.local with your configuration

# Start development server
npm run dev

Visit http://localhost:3000 to see the application.

Using the SDK

import { MoltFi } from '@moltfi/sdk';

// Initialize MoltFi client
const moltfi = new MoltFi({
  apiKey: process.env.MOLTFI_API_KEY,
  network: 'base-mainnet'
});

// Create an AI agent account
const agent = await moltfi.agents.create({
  name: 'Trading Agent Alpha',
  policy: {
    dailyLimit: '1000 USDC',
    perTxLimit: '100 USDC',
    allowedContracts: ['uniswap-v3', 'aave-v3'],
    expiresIn: '30 days'
  }
});

// Agent executes a swap
const tx = await agent.swap({
  from: 'USDC',
  to: 'ETH',
  amount: '100',
  slippage: 0.5
});

console.log(`Transaction hash: ${tx.hash}`);

OpenClaw Integration

# Install MoltFi skill for OpenClaw
openclaw skill add @moltfi/openclaw-banking

# Now your OpenClaw agent can:
# - "Pay 50 USDC to 0x123... for API access"
# - "Swap 100 USDC to ETH on Uniswap"
# - "Check my MoltFi balance"
# - "Show my spending this week"

Smart Contracts

The MoltFi protocol consists of several core smart contracts:

Core Contracts

Deployment

cd contracts

# Install dependencies
npm install

# Compile contracts
npx hardhat compile

# Run tests
npx hardhat test

# Deploy to testnet
npx hardhat run scripts/deploy.js --network base-sepolia

# Verify contracts
npx hardhat verify --network base-sepolia DEPLOYED_CONTRACT_ADDRESS

See contracts/DEPLOYMENT.md for detailed deployment instructions.

Security

Security Model

MoltFi implements a defense-in-depth security approach:

  1. No Direct Key Access: Agents never receive raw private keys
  2. ERC-7710 Delegation: Time-bound, revocable permissions
  3. Policy Enforcement: On-chain validation of all transactions
  4. Circuit Breakers: Automatic suspension on suspicious activity
  5. Multi-Party Approvals: Required for high-value transactions

Policy Configuration

MoltFi supports fine-grained policy controls:

Spending Limits

{
  perTxLimit: '100 USDC',      // Maximum per transaction
  dailyLimit: '1000 USDC',     // Daily budget
  monthlyLimit: '10000 USDC'   // Monthly budget
}

Vendor Allowlists

{
  allowedContracts: [
    '0x...', // Specific contract addresses
    'uniswap-v3',  // Named protocols
    'aave-v3'
  ]
}

Operational Constraints

{
  allowedOperations: ['swap', 'transfer', 'stake'],
  assetRestrictions: ['USDC', 'ETH'],  // Only specific tokens
  timeWindows: {
    start: '09:00',  // Business hours only
    end: '17:00'
  }
}

Development

Running Tests

# Frontend tests
npm test

# Smart contract tests
cd contracts && npx hardhat test

# Run with coverage
npx hardhat coverage

Linting

# Lint TypeScript/React
npm run lint

# Lint Solidity
cd contracts && npm run lint

Building for Production

npm run build
npm start

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Technical Standards

MoltFi is built on top of cutting-edge Ethereum standards:

About

MoltFi Presentation Layer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors