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

feat(hyperliquid): estimate fees properly #1384

Conversation

james-a-morris
Copy link
Contributor

@james-a-morris james-a-morris commented Jan 22, 2025

This update sets the fees more accurately by calling into the suggested fees API endpoint with a simulated message payload.

The caveat here is that due to rounding issues there's sometimes a 1 unit refund against the recipient (0.000001 USDC). Examples:
* https://arbiscan.io/tx/0x0ad884bf8eadcda92a2ad3fc55d62d79bac30ac80c83f0d0c32e04b06e8ace56
* https://arbiscan.io/tx/0xc800914ff0d79bc6c5032abfe3a90cfbd35c48109420b1d0f1b04d4720dab0f5

Copy link

linear bot commented Jan 22, 2025

Copy link

vercel bot commented Jan 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-frontend-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 5:06pm
sepolia-frontend-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 5:06pm

Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: james-a-morris <[email protected]>
Copy link
Contributor

@dohaki dohaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@james-a-morris james-a-morris merged commit e2603a3 into james/hyperliquid-integration Jan 22, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants