feat(action-providers): add GBLIN treasury index (Base) - #1376
gblinproject wants to merge 14 commits into
Conversation
🟡 Heimdall Review Status
|
|
Hi maintainers 👋 — gentle nudge on this one after a few weeks. Status from our side:
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! |
|
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. |
Description
Adds a
gblinaction 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.buy_gblinquoteBuyfrom the GBLIN Lens and callsbuyGBLINon the vault with a slippage-bounded minimum output.sell_gblin_for_ethquoteSellfrom the Lens, approves the shares to the GBLIN Zap if needed, and callssellGBLINForEthon the Zap, which redeems in kind and sells every leg, all or nothing.get_gblin_stateDesign notes:
isNavReliable()is false.supportsNetwork).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, andsupportsNetwork.tsc --noEmit,eslintandprettier --checkpass locally.The provider was also run end to end against a local fork of Base mainnet:
get_gblin_state,buy_gblin(0.002 ETH) andsell_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
Happy to adjust naming, structure, or scope (e.g. dropping an action) to match maintainer preferences.