A Vincent App for trading Perps at Hyperliquid, where users can:
- deposit USDC from PKP Wallet to Hyperliquid Account
- place an order by simply input "coin/amount/leverage" and click "buy/sell"
what`s next?
- withdraw USDC from Hyperliquid Account to PKP Wallet
- event-driven functions like showing price/positions
note: the project may be completed by 80% and there are still some bugs to fix
Ref: https://github.com/LIT-Protocol/vincent-starter-app
- Funding tokens unchanged.
- Depositing USDC at Hyperliquid by official ability "@lit-protocol/vincent-ability-erc20-transfer. Users transfer funded USDC in PKP wallet to the Hyperliquid: Deposit Bridge 2
(0x2Df1c51E09aECF9cacB7bc98cB1742757f163dF7) in Arbitrum
- Trading Perps at Hyperliquid by newly ability "@kazemochizuki/hyperliquid-perps" (source code: https://github.com/kazemochizuki/vincent-ability-hyperliquid-perps). When users submit buy/sell within params(coin/amount/leverage), the app fetch the midprice and add a least price spread to place the limit & Gtc order, like a market order in traditional exchanges.
- The PKP wallet connects the Hyperliquid endpoints(Info/Exchange) by unofficial SDK "@nktkas/hyperliquid". The Ability creates a PKPEthersWallet by controllerSessionSigs from signer of delegatee to generate the signature required by Exchange Endpoint.
- The Vincent App & Vincent Ability are created in https://dashboard.heyvincent.ai/
- The web-application is deployed through https://railway.com/