Skip to content

feat(action-providers): Add Santa Rosa Action Provider for 0.03% DEX Swaps and Anti-Liquidation Flash Rescues on Base L2 - #1612

Open
lucascordone-spec wants to merge 2 commits into
coinbase:mainfrom
lucascordone-spec:feat/santarosa-action-provider
Open

lucascordone-spec wants to merge 2 commits into
coinbase:mainfrom
lucascordone-spec:feat/santarosa-action-provider

Conversation

@lucascordone-spec

@lucascordone-spec lucascordone-spec commented Oct 31, 2026 •

Copy link
Copy Markdown

Summary

Adds the SantaRosaActionProvider to @coinbase/agentkit, providing autonomous AI agents on Base L2 (base-mainnet and base-sepolia) with:

  1. Ultra-Low Fee DEX Swaps (0.03%): Routing via Santa Rosa Smart Router at 3 bps (saving up to 88% compared to standard 25-30 bps DEX routers like Uniswap).
  2. 0% Fee Morpho Blue Flash Loan Multipliers: 1-click leverage at a 0.10% total fee (0.08% protocol, 0.02% developer revenue share).
  3. Anti-Liquidation Debt Rescues: Deleveraging at-risk CDP positions on Morpho Blue and Aave v3 before MEV liquidators strike, cutting penalties from 5.00% down to 0.25% (20x savings).
  4. Instant Builder Revenue Share: Programmatically transferring 0.01% - 0.05% of executed volume directly to the agent operator or partner wallet on-chain in the same transaction block.

Changes

  • Added typescript/agentkit/src/action-providers/santarosa/:
    • constants.ts: Router contract on Base (0xcd4f88bca4e2653fd24f61b4ef3aaccd76310a57), Chain IDs (8453, 84532), fee constants (3 bps swap fee vs 25 bps Uniswap).
    • schemas.ts: Zod validation schemas for all actions (swap, quote_leverage_multiply, get_user_debt_positions, simulate_rescue_savings, build_rescue_transaction).
    • santaRosaActionProvider.ts: Action provider extending ActionProvider<EvmWalletProvider> with @CreateAction methods.
    • santaRosaActionProvider.test.ts: Jest test suite covering network support, schemas, and action execution.
    • index.ts: Barrel exports.
    • README.md: Comprehensive documentation following AgentKit templates.
  • Registered export in typescript/agentkit/src/action-providers/index.ts.

Verification

  • Tested network compatibility with base-mainnet and base-sepolia.
  • Validated swap execution and calldata generation targeting Base Mainnet Router 0xcd4f88bca4e2653fd24f61b4ef3aaccd76310a57.
  • Verified Jest unit test suite covering network support, swap routing, and mathematical debt comparisons.

Motivation for Base & AgentKit Ecosystem

Autonomous agents execute frequent micro-transactions and deplete balances quickly under standard 0.25% - 0.30% swap fees. Integrating Santa Rosa gives AgentKit agents the cheapest swap execution venue on Base while providing an instant, automated on-chain revenue share stream for agent builders.

@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 31, 2026
@lucascordone-spec lucascordone-spec changed the title feat(agentkit): add Santa Rosa Protocol Action Provider for Base L2 feat(action-providers): Add Santa Rosa Action Provider for 0.03% DEX Swaps and Anti-Liquidation Flash Rescues on Base L2 Oct 31, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

2 participants