@vesta-finance/dex-trader-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.18 • Public • Published

Dex Trader - SDK

This package has been designed to make it easier to use Vesta's Dex Trader and trying to give the best path possible. Dex Trader Doc

Installation

npm i @vesta-finance/dex-trader-sdk

Setup Envrionment Variables

How to use

import { DexTrader } from '@vesta-finance/dex-trader-sdk';

const [expectingAmountOut, manualExchanges] = await DexTrader.quote(
	'arbitrum',
	'0x82af49447d8a07e3bd95bd0d56f35241523fbab1',
	'0x64343594ab9b56e99087bfa6f2335db24c2d1f17',
	10,
	1,
	provider
);

Todo

Open to contribution, here are the things that is currently missing

  • Unit tests
  • Amount discovery on uniswapV3 to we use the correct pool fee
    • Currently it uses 1 ether.
  • Route discovery on sushiswap
    • Currently it tries to find a pair, if it doesn't exit, it hops to WETH.
  • Route discovery on gmx
    • Currently it ignores gmx multi-hop, hoping that if an aggregator gives gmx, it will be single path.

Package Sidebar

Install

npm i @vesta-finance/dex-trader-sdk

Weekly Downloads

0

Version

0.1.18

License

MIT

Unpacked Size

327 kB

Total Files

34

Last publish

Collaborators

  • 0xatum