START HERE! Vektor Quickstart Guide πŸš€

START HERE! Vektor Quickstart Guide πŸš€

Nobody fully grasps just how powerful Vektor is when they first log in. When you use a language like VXL, there are unlimited workflow possibilities. So we made you a list of commands to discover and get familiar. Follow this script and you'll be a master in no time! πŸ₯‰πŸ₯ˆπŸ₯‡πŸ…πŸŽ–οΈ

πŸ’‘
Another really great way to discover Vektor functionalities is by using Quick Actions. We recommend you run through the Beginner and Intermediate Commands below first, and then read this.

πŸ₯‰ Beginner Commands πŸ₯‰

Copy and paste the VXL statement that you see in the CODE BLOCKS below (or retype them yourself) into Vektor's command line.

  1. BLOCKCHAINS or BLOCKS - View a list of our supported blockchains
  2. VENUES - View a list of our supported venues
  3. FUNCTIONS - View a a list of all Vektor functions and subfunctions
    .
    🚨 The next step is very important to access Vektor's best functionalities 🚨
    .
  4. Add your first "label" (named address) using β€Œβ€ŒLABELS.ADD("MY_ADDRESS", $INSERT ADDRESS HERE$)
    β€Œβ€Œor, if you want to use a demo address, try
    β€Œβ€ŒLABELS.ADD("DEMO_ADDRESS", 0X870078AA499547584145308B7CFA0CA36FB676C0)
  5. CLEAR - Clear the workspace
  6. LABELS - View a list of all your labels
  7. POSITIONS - Get a summary of ALL your positions across all different types, chains, venues, and labels) e.g. LP positions on Ethereum, Lend positions on Arbitrum etc.
  8. BALANCES - Get a list of global spot balances - all labels, chains, assets
  9. BALANCES(INCLUDE_BLOCKCHAINS=[ETHEREUM, POLYGON]) - filtered view of balances
  10. SELL.QUOTES(1000, USDC, USDT) - Get all the different pool swap quotes for selling 1000 USDC for USDT
  11. SELL(100%, USDC, USDT, ARBITRUM, DEMO_ADDRESS) - Sell all of the USDC on Arbitrum at the DEMO_ADDRESS label for USDT
  12. TRANSACTIONS - Get a list of all transactions built using Vektor

Good job! πŸ₯‰ CLEAR the workspace and get ready for the Intermediate level. πŸš€

Further reading (Beginner) - optional

πŸ₯ˆ Intermediate Commands πŸ₯ˆ

  1. HISTORY - View a list of command line history
  2. ↑ (up arrow) - Put last submitted command back in the command line
  3. PRICE(ETH) - View the price of an asset
  4. PRICE(ETH, QUOTE=WBTC) - View the price of ETH, quoted in Bitcoin (WBTC)
  5. ALERT(PRICE(ETH) > 2000) - Set price alert for when ETH price > $2,000
  6. ALERT(PRICE(WBTC, QUOTE=ETH) > 20) - Set alert for when BTC/ETH ratio > 20
  7. ALERTS or ALERT.LIST - View a list of your alerts
  8. LEND.MARKETS - View a list of all supported lend markets
  9. LEND.MARKETS(INCLUDE_ASSETS=[USDT, USDC], INCLUDE_BLOCKCHAINS=[ARBITRUM, OPTIMISM]) - View a list of USDT and USDC lend markets on either Arbitrum or Optimism
  10. SORT(LEND.MARKETS(INCLUDE_ASSETS=[USDT, USDC]), "SUPPLY_APY", ASC=FALSE) - View a list of USDT and USDC markets, sorted by supply APY (highest first)
  11. LEND.POSITIONS - Get all your lending positions across all chains, venues, and labels
  12. BORROW.POSITIONS - Get all your borrow positions across all chains, venues, and labels
  13. LEND(1, ETH, AAVE_V3, ARBITRUM, DEMO_ADDRESS) - Lend 1 ETH to Aave v3 on Arbitrum (adjust parameters for your purposes)
  14. BRIDGE.QUOTES(1000, USDT, ARBITRUM, OPTIMISM) - Get a list of quotes for bridging 1000 USDT from Arbitrum to Optimism
  15. BRIDGE(50%, USDT, ARBITRUM, OPTIMISM, DEMO_ADDRESS) - Bridge 50% of your USDT at DEMO_ADDRESS from Arbitrum to Optimism using the default quote
  16. MCAP(ETH) + MCAP(STETH) - Compute combined market cap of ETH and STETH assets
  17. LP.POOLS(INCLUDE_ASSETS=[STETH]) - View a list of all supported LP pools containing STETH as a constituent asset
  18. LIST.CONCAT(LP.POOLS(INCLUDE_ASSETS=[STETH]), LP.POOLS(INCLUDE_ASSETS=[RETH])) - Join together (concatenate) a list of LP pools containing STETH with a list of LP pools containing RETH
  19. LP.POSITIONS - Get all your LP positions across all chains, venues, and labels
  20. LP.DEPOSIT(0.5, WETH, LP.POOL([LUSD, WETH], SUSHISWAP, ETHEREUM), DEMO_ADDRESS) - Deposit 0.5 WETH and equivalent LUSD to the LUSD-WETH pool on Sushiswap on Ethereum (adjust for your purposes)

Good job! πŸ₯ˆ CLEAR the workspace and get ready for the Advanced level. πŸš€

Further reading (Intermediate) - optional

πŸ₯‡ Advanced Commands πŸ₯‡

  1. PRICES - Get a list of prices for all assets
  2. SORT(PRICES, "CHANGE_24H", ASC=FALSE) - Get a list of prices for all assets, sorted by 24hr price change % in descending order (i.e. largest first)
  3. ROW(SORT(PRICES, "CHANGE_24H", ASC=FALSE), 1) - Extract the first row from the above list
  4. ROW(SORT(PRICES, "CHANGE_24H", ASC=FALSE), 1).ASSET - Access the the "ASSET" data point from the above row struct/object (i.e. the asset name for the best performing asset in the last 24h)
  5. BALANCES.ASSET.SYMBOL - Get a list of all the asset symbols of your spot balances across all chains and labels
  6. LIST.CONTAINS(BALANCES.ASSET.SYMBOL, ROW(SORT(PRICES, "CHANGE_24H", ASC=FALSE), 1).ASSET) - Conditional test (TRUE/FALSE) whether your spot balances include the best performing asset in the last 24h
  7. Set an alert for the above; Alert me when the 24hr best performing asset is something in my portfolio (i.e. so I can think about selling it)
    β€ŒALERT(LIST.CONTAINS(BALANCES.ASSET.SYMBOL, ROW(SORT(PRICES,"CHANGE_24H", ASC=FALSE), 1).ASSET), NAME="YOU HAVE A HIGH-PERFORMING ASSET!")
  8. ASSETS - Get a list of all supported assets
  9. ASSETS(INCLUDE_BLOCKCHAINS=[ARBITRUM]) - Get a list of all supported assets, filtered for only Arbitrum assets
  10. PRICES(INCLUDE_ASSETS=ASSETS(INCLUDE_BLOCKCHAINS=[ARBITRUM]) - Get a list of prices for all Arbitrum assets
  11. PRICES(INCLUDE_ASSETS=ASSETS(INCLUDE_BLOCKCHAINS=[ARBITRUM]).MARKET_CAP - Get a list of market cap data points for all Arbitrum assets
  12. SUM(PRICES(INCLUDE_ASSETS=ASSETS(INCLUDE_BLOCKCHAINS=[ARBITRUM]).MARKET_CAP) - Get the total market cap of all Arbitrum assets
  13. Find out "How much TVL do I have on Curve?"
    SUM(COLUMN(LP.POSITIONS(INCLUDE_VENUES=[CURVE]), "VALUE"))
    or
    SUM(LP.POSITIONS(INCLUDE_VENUES=[CURVE]).VALUE)
  14. Find out "What's the Average supply APY across a basket of stablecoins?"
    AVERAGE(LEND.MARKETS(INCLUDE_ASSETS=[USDC, USDT, DAI, SUSD, BUSD, GUSD, LUSD], INCLUDE_BLOCKCHAINS=[ETHEREUM]).SUPPLY_APY)
  15. Find out "What's the best APY if I LP my stETH?"
    MAX(LP.POOLS(INCLUDE_ASSETS=[STETH]).APYS.AVG_30D)
  16. BORROW.ACCOUNTS - Get account-level borrow information on all your labels
  17. Set an alert for when your riskiest debt position is close to getting liquidated
    ALERT(MIN(COLUMN(BORROW.ACCOUNTS, "HEALTH_FACTOR")) < 1.1, NAME="LIQUIDATION IMMINENT, ADD MORE COLLATERAL!")

Amazing job! πŸ₯‡ CLEAR the workspace and get ready for the Expert level. πŸš€

πŸ‘‹
If you've made it this far - we want to speak to you! Contact us using your Vektor id email for information about our VIP user program.

Further reading (Advanced) - optional

πŸ… Expert Commands πŸ…

  1. Set an alert for when your LP position is no longer in the best APY pool
    ALERT(NOT(LIST.CONTAINS(LP.POSITIONS.POOL, MAX(LP.POOLS(INCLUDE_ASSETS=[WMATIC]), ["APYS", "AVG_30D"]))))
  2. Generate a list of all the assets in Uniswap v3 pools on BNB chain
    LIST.UNIQUE(LIST.FLATTEN(LP.POOLS(INCLUDE_VENUES=[UNISWAP_V3], INCLUDE_BLOCKCHAINS=[BNBCHAIN]).ASSETS))
  3. Deposit a concentrated liquidity position to a range
    LP.DEPOSIT(0.15, ETH, LP.POOL([WETH, USDC], UNISWAP_V3, ARBITRUM), DEMO_ADDRESS, RANGE=[1600, 1700]) (adjust parameters for your purposes)
  4. Set an alert for when your LP position is no longer in range
    ALERT(NOT(LP.POSITION(LP.POOL([WMATIC, USDC], UNISWAP_V3, POLYGON), DEMO_ADDRESS).RANGE.IN_RANGE), NAME="POSITION OUT OF RANGE!!")
  5. Simulate entering a position with 3 different deposit quotes
    LP.DEPOSIT_QUOTE(100, ETH, LP.POOL([ETH, STETH], UNISWAP_V3, ETHEREUM), RANGE=[0.9, 1.11]); LP.DEPOSIT_QUOTE(100, ETH, LP.POOL([ETH, STETH], UNISWAP_V3, ETHEREUM), RANGE=[0.94, 1.04]); LP.DEPOSIT_QUOTE(100, ETH, LP.POOL([ETH, STETH], UNISWAP_V3, ETHEREUM), RANGE=[0.98, 1.00])
    (you can also use Shift-N instead of ; to add multi-line statements)
  6. Compute the Lend-Borrow spread for USDC on Compound V3 on Arbitrum
    BORROW.MARKET(USDC, COMPOUND_V3_USDC, ARBITRUM).BORROW_APY - LEND.MARKET(USDC, COMPOUND_V3_USDC, ARBITRUM).SUPPLY_APY
  7. Set a multi-criteria alert
    ALERT(AND(OR(PRICE(ETH) < 1700, PRICE(ETH) > 2000),OR(PRICE(WBTC) < 22000, PRICE(WBTC) > 30000)))

Superb job! πŸ… CLEAR the workspace and get ready for the Master level. πŸš€

Further reading (Expert) - optional

πŸŽ–οΈ Master Commands πŸŽ–οΈ

These depend on functionality that's still in development. We will add soon! πŸ›°οΈ

Any questions about Vektor or VXL please Let us know! We're always happy to help.