Skip to content

feat: add Sapien Vault action provider (Base ERC-4626) - #1493

Open
xhad wants to merge 3 commits into
coinbase:mainfrom
xhad:cursor/sapien-vault-action-provider-bb50
Open

feat: add Sapien Vault action provider (Base ERC-4626)#1493
xhad wants to merge 3 commits into
coinbase:mainfrom
xhad:cursor/sapien-vault-action-provider-bb50

Conversation

@xhad

@xhad xhad commented Sep 10, 2026

Copy link
Copy Markdown

Summary

Adds a TypeScript Sapien Vault action provider for AgentKit so agents can deposit, withdraw, and read position state on the Sapien Vault (Base ERC-4626).

Actions

  • deposit — approve SAPIEN if needed, then ERC-4626 deposit
  • withdraw — ERC-4626 withdraw back to SAPIEN
  • get_balance — shares + assets for the wallet

Network

Base mainnet only (supportsNetwork gated).

Contracts (EIP-55)

  • Vault / vSAPIEN: 0x60Bf63729f688287a450299962b36Cef0aFfaa42
  • Underlying SAPIEN: 0xC729777d0470F30612B1564Fd96E8Dd26f5814E3

Notes

  • Pattern follows the Morpho Vault provider.
  • Includes unit tests, provider README, package README mention, and a changeset (patch for @coinbase/agentkit).
  • App: https://vault.sapien.io

Test plan

  • cd typescript/agentkit && pnpm test (sapienVault tests)
  • Review Base-only network gate
  • Optional: smoke via langchain CDP smart wallet chatbot example

cursoragent and others added 2 commits September 10, 2026 06:42
Add an EVM action provider so AgentKit agents can deposit SAPIEN,
withdraw or redeem vSAPIEN, and read position state on the Base
mainnet ERC-4626 Sapien Vault.

Co-authored-by: Chad <xhad@users.noreply.github.com>
Prevent a leftover approve call from the insufficient-allowance
deposit test from failing the skip-approve assertion.

Co-authored-by: Chad <xhad@users.noreply.github.com>
@xhad
xhad requested a review from murrlincoln as a code owner September 10, 2026 06:45
@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
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 0
Sum 1

@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider typescript labels Sep 10, 2026
Remove RewardsController. Keep SAPIEN approve as an internal
deposit helper only. Add get_vault_totals, tranche fields on
get_position, and vSAPIEN transfer with matured/available checks.

Co-authored-by: Chad <xhad@users.noreply.github.com>
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.

3 participants