project screenshot 1
project screenshot 2
project screenshot 3

AgentKit Swaps&Types

1. Swap, quote and token-find actions for AgentKit leveraging Sushi infrastructure. 2. Major type-safety improvement.

AgentKit Swaps&Types

Created At

Agentic Ethereum

Winner of

Coinbase

Coinbase Developer Platform - Best AgentKit Contributions 1st place

Coinbase

Coinbase Developer Platform - AgentKit Pool Prize

Prize Pool

Project Description

The project encompasses two main parts:

  1. Simple, on-chain swaps using Sushi, across many evm-based networks. This includes token address lookup, human-readable to "machine" amount conversion (0.1 ETH is 1e17 wei), and quote checks (the agent first fetches a quote, offers it to the user and only proceeds with the swap if the user agrees).

  2. Major type cleanup. Allows for a safer and simpler experience for developers.

  • ViemWalletProvider was heavily cleaned up, type-wise. ReadContract function now behaves as expected, SignTypedData is now typed, etc.
  • CdpWalletProvider and the parent class EvmWalletProvider have received similar improvements.
  • 0x${string} has been replaced with Address and Hex approprietly.
  • The Network type has been tightened down considerably, including the chain and network id maps
  • Instead of regexes, address checks in zod schemas now use the isAddress function from viem

https://github.com/coinbase/agentkit/issues/310

How it's Made

  • The Sushi Router API (for swaps and quotes) and Sushi Data API (for token lookups)
  • OpenAI for agent testing, AgentKit for tying it all together
  • VSCode, ~6 fingers (I refuse to learn full touch-typing) and a healthy amount of caffeine

That's about it, not much more to say, character limit etc.

background image mobile

Join the mailing list

Get the latest news and updates