Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sushi: swap, quote and find-token actions #309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LufyCZ
Copy link

@LufyCZ LufyCZ commented Feb 9, 2025

What changed? Why?

  • Added sushiRouterActionProvider to provide swap and quote functionality using the Sushi Router API.
  • Added swap action for swaps.
  • Added quote action for fetching quotes for swaps.
  • Added sushiDataActionProvider to provide token finding functionality using the Sushi Data API.
  • Added find-tokens action for fetching tokens by symbols or addresses.

Why? No on-chain swap solution was present. Also, the agent didn't have a repository to pull token details from.

Features

End-to-End swap on-chain experience. Asking the agent to "Swap 1 ETH to USDC" results in a successful swap. The agent first looks up the address of "USDC" (it already knows that ETH is 0xee...ee in the context of Sushi), then, it fetches a quote and asks the user if they want to continue. If they do, the swap is executed. Cases like insufficient balance or allowance is handled.

Qualified Impact

Nothing should be affected, worst case, the user can remove the sushi actions.

Showcase

@cb-heimdall
Copy link

cb-heimdall commented Feb 9, 2025

🟡 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
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

@0xRAG 0xRAG added action provider New action provider needs review PR / issue needs review cherry labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action provider New action provider cherry needs review PR / issue needs review
Development

Successfully merging this pull request may close these issues.

3 participants