Skip to content

feat(action-providers): add GBLIN treasury index (Base) - #1376

Open
gblinproject wants to merge 14 commits into
coinbase:mainfrom
gblinproject:gblinproject-patch-1
Open

gblinproject wants to merge 14 commits into
coinbase:mainfrom
gblinproject:gblinproject-patch-1

Conversation

@gblinproject

@gblinproject gblinproject commented Jul 18, 2026

Copy link
Copy Markdown

Description

Adds a gblin action provider so an agent can buy, redeem, and read GBLIN, a collateral-backed treasury index on Base (cbBTC / WETH / USDC). The vault mints at NAV, redeems pro rata in kind, and reduces the weight of a basket asset on-chain when it draws down. It is intended for parking surplus agent capital in managed crypto exposure: explicitly not a stablecoin and not financial advice.

Action Description
buy_gblin Buy GBLIN with ETH. Reads quoteBuy from the GBLIN Lens and calls buyGBLIN on the vault with a slippage-bounded minimum output.
sell_gblin_for_eth Redeem GBLIN back to ETH (e.g. to free capital for an x402 payment). Reads quoteSell from the Lens, approves the shares to the GBLIN Zap if needed, and calls sellGBLINForEth on the Zap, which redeems in kind and sells every leg, all or nothing.
get_gblin_state Read the ETH value of one GBLIN at NAV, the total supply, and whether the vault reports its NAV as reliable.

Design notes:

Tests

Unit tests are in typescript/agentkit/src/action-providers/gblin/gblinActionProvider.test.ts (13 tests). They cover the buy and redeem paths (asserting the exact encoded calldata and the quote-derived minimum output), the approval being sent only when the allowance is short, the NAV-reliability guard, a reverted transaction reported as an error, input validation, a zero quote, error handling, and supportsNetwork. tsc --noEmit, eslint and prettier --check pass locally.

The provider was also run end to end against a local fork of Base mainnet: get_gblin_state, buy_gblin (0.002 ETH) and sell_gblin_for_eth (approval plus Zap exit) all confirmed. Earlier simulations of the Zap exit settled 3 bps below NAV for a ~$2 exit and 43 bps for a ~$0.20 exit, inside the default 1% bound.

I have not included an end-to-end chatbot transcript, and I'd rather flag that than pad this section. GBLIN is deployed on Base mainnet only, so an end-to-end run spends real funds. If a transcript is required for review, I'm happy to run one of the chatbots in typescript/examples/ against mainnet with a small amount and paste the output here.

Checklist

  • Added documentation to all relevant README.md files
  • Added a changelog entry

Happy to adjust naming, structure, or scope (e.g. dropping an action) to match maintainer preferences.

@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 Jul 18, 2026
@gblinproject

Copy link
Copy Markdown
Author

Hi maintainers 👋 — gentle nudge on this one after a few weeks.

Status from our side:

  • Branch is up to date with main (0 behind), +495/−0 across 9 files — additive only, no changes to existing providers.
  • The two checks that auto-ran are green (StepSecurity, labeler). The lint/format/test workflows are still awaiting first-time-contributor approval, so they have never executed — happy to fix anything they surface as soon as they are allowed to run.
  • Scope recap: an action provider with three actions (state read, buy, sell) for GBLIN, a reserve-backed basket token on Base (cbBTC/WETH/USDC, mint/redeem at NAV directly against the contract). No new dependencies; follows the existing action-provider template.

If the contribution guidelines changed since July or you would prefer a different structure, tell us and we will adjust quickly. Thanks for your time!

@gblinproject

Copy link
Copy Markdown
Author

Checking in once more, then I'll stop.

Open since 18 July. Still mergeable against main, additive only, no new dependencies. The lint/format/test workflows have never actually run — they're waiting on first-time-contributor approval — so there's nothing red here, there's nothing at all.

I'd rather have a clear no than an open tab. If third-party action providers aren't something this repo is taking right now, say so or just close it, and we'll ship the code in our own package instead. If it's still on the table, approving the workflow run would tell us both whether it actually passes.

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