December 27, 2021, 5:01:02 PM
Learn Vektor with a 10 min walkthrough
Welcome to Vektor! 🎉
This 10 minute tutorial aims to get you started using Vektor, by walking through core concepts using real functions and data.
Note: This tutorial is designed so you can try out the commands yourself if you want to - just copy and paste them or retype them in the command line as you encounter them in this walkthrough.
Vektor UI has two fundamental pieces to it:
Commands are written in Vektor Execution Language (VXL™), a powerful but intuitive syntax that uses spreadsheet-styled functions. VXL unlocks new levels of web3 programmability for Vektor users.
The Vektor UI.
For optimum experience we recommend users engage with Vektor using the keyboard as much as possible, although it's possible to do most things using the mouse.
Note: Vektor works best on larger / external monitors. However if you are using a smaller laptop screen then you can Zoom out on most browsers by pressing Command + '-' key (or Ctrl + '-') to make more space.
A command in Vektor is a single statement that gets submitted to 'make something happen'. Commands are composed of one or more functions.
Press the Escape key on your keyboard to ensure the Command Line is activated. Then type START or START() into the command line.
Press Enter or click the GO button to run the START function as a command. The result shows in a new view pane.
Most command submissions result in a new view pane appearing in the workspace.
At any time, you can see a history of the commands you recently submitted using the HISTORY function. Type HISTORY and press Enter.
A second view pane will appear containing the result of the HISTORY function.
A second view pane appears and becomes active (as shown by the green header bar highlight)
You can wipe the screen clear by using the CLEAR function. Type CLEAR and press Enter.
Note: If you are viewing this tutorial in the app, then this view pane will also disappear if you use CLEAR! You can run TUTORIAL again to bring it back, or consider opening it in a second tab.
The result is a clear workspace.
Clean and ready for action.
Many functions will take one or more arguments. Similar to spreadsheet functions, VXL functions take arguments inside brackets with commas separating them.
e.g. FUNCTION(arg1, arg2, ... )
Depending on the function, arguments can be numbers (decimal / integer), text, boolean (True / False) values or Vektor objects like assets, blockchains, labels, portfolios, or workspaces. Arguments can also be other nested functions.
As an example, the DOCS function can instantly show you documentation on a specific function, by taking the function name as an argument.
Passing CLEAR as the only argument to the DOCS function will open up the documentation for the CLEAR function.
The Documentation for the CLEAR function loads directly in the Vektor App.
Labels are a core concept in Vektor. Labels are human-readable names that you assign to blockchain addresses. Because they are quicker to type, labels allow us to easily and securely reference full addresses in Vektor functions, without worrying about mistakes or typos.
To see which labels you've set up, type LABEL end press Enter.
A list of labels appears in a new pane. If you haven't created any labels before, it will be empty.
No labels are shown because none have been created yet.
To add a new label, use the LABEL.ADD(name,address) subfunction. Label names cannot include spaces.
Congratulations!🎉 You've added your first label called DEFI_WALLET. If we run LABEL or LABEL.LIST again we can see it exists.
Your new labelled address now shows up in the list.
Note: In Vektor, extended capability of functions can be accessed using the dot notation after the function name and adding another subordinate function keyword. We call these Subfunctions. In the case of the LABEL function, available subfunctions include .ADD, .REMOVE, and .LIST. In the above example, LABEL.LIST is the default subfunction when you use LABEL on its own, so LABEL and LABEL.LIST achieve exactly the same.
Now that we've created a label, we can reference it in other functions without having to retype the address. For example, we can check the balance of DEFI_WALLET using the BALANCE function.
This opens a new pane with the ETH (Ethereum) balance of DEFI_WALLET.
The ETH balance of DEFI_WALLET shown at full precision.
The BALANCE function also works for other tokens, for example DAI.
Multiple panes for different asset balances of the same labelled address.
If you need some assistance using Vektor's Execution Language (VXL), we're here for you! There are several ways that Vektor tries to simplify the learning curve:
1. Autocomplete in the command line
The command line will help you with popups and dropdowns that suggest values for functions and arguments based on typed information and expected data types. You can accept these suggestions by simply pressing Tab one or more times as you write out your command.
Autocomplete in action using the Tab key.
2. Use the Function Form
When you submit a command that contains a function with incomplete arguments, Vektor will open a form to help you fill in the gaps. The form will do its best to pre-fill all the arguments that you entered correctly, and you can use the drop-down menus to complete the required arguments that were missing.
The Function Form prompts for incomplete arguments using intuitive drop down lists.
The preview at the bottom of the function form shows you how the completed function will appear, so you can remember for next time. When you're ready, the INSERT button will helpfully put this completed function back into the command line, ready for submission.
3. Use the DOCS function
Vektor has detailed documentation on all functions, which includes explanations of the different arguments and subfunctions. Use the DOCS function to access all the documentation, or jump straight to a specific function using DOCS(function_name).
Index of Function documentation accessed using the DOC function.
4. Chat to us 📞
We'd love to hear from you! You can either chat to us using messaging for real-time support, or set up a video call with someone at Vektor.
You can open the real-time chat feature either using the CHAT function or by clicking on the chat widget in the bottom-right corner of the screen.
The chat button.
To set up a video call, simply use the CALL function and pick a time that suits you on Calendly.
Portfolios in Vektor can display a summary of asset balances and other key information at a glance. You can create portfolios using one or more labelled addresses that you set up in a previous step.
This will create a new portfolio called "MY_PORTFOLIO", initially with no affiliated labeled addresses. You can create as many portfolios as you wish.
You can bring up your portfolio at any time using PORTFOLIO.GET
This will open up the portfolio in a new view pane.
A new portfolio starts empty.
Insert some of your labelled addresses for inclusion in this portfolio using the INSERT subfunction.
Your portfolio will detect all the assets in that labelled address and display the balances and valuation in a table.
The portfolio is aggregating asset balances from all the inserted labelled addresses.
Important: If there are assets missing from this view, you may need to Enable them using PORTFOLIO.EDIT. By default not all assets are enabled.
Note: There are many more things you can do with the PORTFOLIO function and its various subfunctions. For more information run DOCS(PORTFOLIO).
With Vektor you can easily switch from 'mainnet mode' (real transactions with real value) to 'testnet mode' (test transactions with fake value). Users engage testnet mode to execute Vektor's on-chain functionality without using 'real' funds or paying mainnet transaction fees.
To toggle testnet mode, use the TESTNET function.
You can verify that Vektor has entered testnet mode because the command line status bar (the thin line underscoring the command line input area) and all the other green elements in the UI will change color to lilac. The 'GO' button will also change to say 'TESTNET'.
Toggling between mainnet mode (green) and testnet mode (lilac).
While in testnet mode, all Vektor functions will be interpreted in the testnet context. For example, adding labelled addresses will add them as testnet labels (separate to mainnet labels) and on-chain transactions will be effected on testnet blockchains, not on mainnet blockchains. You can consider testnet mode as a completely isolated environment from mainnet mode.
Important: Please be aware the PORTFOLIO function is currently not supported in testnet mode.
To execute on-chain transactions on an Ethereum testnet, you need some testnet ETH to pay transaction fees. For added convenience, Vektor can provide a small amount of testnet ETH for its users free of charge.
To request some testnet ETH, please use the CHAT function and provide us the name of a labelled address you created while in testnet mode. Our support team will transfer some to you.
Get in touch with us using the CHAT function to receive some testnet ETH.
Important: To receive testnet ETH from Vektor, you must provide a label that corresponds to an Ethereum address that you control (i.e. have the corresponding private keys for). It must be associated with your hardware wallet. Vektor will not be able to tell if you provide a label that corresponds to someone else's address or a watch-only address. If we send testnet ETH to an address that you do not control, it will not be useable in testnet mode, and it will not be recoverable. Do not send us your seed phrase or private keys.
Of course, you can use your own testnet ETH if you have some already, or you can acquire some from different sources (subject to availability). These include https://faucet.rinkeby.io and https://faucet.paradigm.xyz.
Let's put your testnet ETH to work with your first on-chain transaction, using Vektor's MOVE function. The MOVE function moves an asset from a sender address to a receiver address. We will use MOVE to move some testnet ETH between two labelled addresses that are both under your control.
Before we start this step, make sure that
For convenience during this first usage, let's use the Function Form to complete the required arguments for move. Type MOVE and hit enter.
Fill in the arguments on the Function Form:
Example Function Form, here used for MOVE.
Click the INSERT button to insert the completed VXL into the Command Line, then press Enter.
MOVE(0.05, ETH, MY_TESTNET_ADDRESS_1, MY_TESTNET_ADDRESS_2)
The Signing Request will appear in front of the workspace.
A Signing Request.
Press CONNECT and select a signing device from the list.
When your device is connected, the device connection status will say 'CONNECTED' and the SIGN button will appear.
Ready to sign.
Click SIGN and follow the instructions on your device.
Signing and broadcasting to the blockchain.
Congratulations! 🎉 you’ve just made an on-chain transaction using Vektor.
The notification of the transaction broadcast will appear. Click VIEW to check the confirmation status on the associated public blockchain explorer.
The Transaction Broadcast Notification links to the public blockchain explorer.
Important: The process for MOVE works exactly the same on mainnet mode (i.e. when testnet mode is off)
The final exercise in this tutorial is to execute your first buy transaction (we will use testnet mode again for this). But before we buy using Vektor, let’s take a brief look at some of the market research functions.
For an overview of asset prices at-a-glance, use the MARKET function.
This will display a table of assets, with common metrics such as price, volume, and market cap. There’s a lot of information in this table, so you may want to resize the view pane using the mouse, or alternatively maximize it using the PANE.MAXIMIZE subfunction.
This will fill the workspace with the view pane with index number 1 (in this case our market table).
Using PANE.MAXIMIZE to fill the workspace with the MARKET pane.
Note: The market table is not a whole-of-market list. Vektor curates this list to be relevant to the blockchains that are supported by the app. Vektor will support more blockchains as time goes on.
If we want to view prices of specific assets, we can use the PRICE function to specify the base asset (e.g. ETH, WBTC, UNI) and quote asset (e.g. USD, EUR, ETH).
Each price feed occupies a view pane; multiple price feeds can exist on the same Workspace. Prices are live updating.
Adding three live price feeds to the Workspace using the PRICE function.
If we want to see a time series of price data, we can use a chart function like GRAPHPRICE, GRAPHVOL, or GRAPHMCAP.
Charts open in their own view panes.
Adding charts to the Workspace using GRAPHPRICE, GRAPHMCAP, and GRAPHVOL functions.
With the graph functions, as well as functions like PRICE, BALANCE, PORTFOLIO and MARKET, we can configure the Workspace into powerful customized dashboards full of different view panes. Changes to your Workspace are saved automatically. You can switch to a new Workspace and then recall this one later using the WORKSPACE function.
Configuring different Workspaces using the WORKSPACE function.
Important: Vektor will be adding support for more blockchains and assets as time goes on. To see a list of current supported blockchains and assets, use the BLOCKCHAINS and ASSETS functions.
Let’s buy something using your testnet ETH! Just like with MOVE, the BUY and SELL functions are execution functions that interact with blockchains. For this exercise, we will make a simple trade using the Uniswap v2 testnet smart contract on Ethereum.
So for example, if we wanted to buy 0.1 Wrapped Bitcoin (WBTC) using our ETH, and spending from labelled address ‘MY_TESTNET_ADDRESS_1’, the VXL would be
BUY.SIMPLE(0.10, WBTC, ETH, MY_TESTNET_ADDRESS_1)
Hit Enter and you will see the Signing Request. Connect your wallet by pressing the CONNECT button.
Note: On testnet, assets do not have real market value. The exchange rate shown on this Signing Request is clearly not realistic, but this is expected behaviour for testnet because there are no market forces acting to calibrate asset prices to their ‘real’ level.
Press SIGN and follow the instructions on your device. Once you approve, the transaction will be broadcast and you will see the Transaction Broadcasted notification.
That’s it! You just completed a buy transaction using VXL and Vektor’s execution engine. Well done!🎉
This is the end of the tutorial, but just the beginning of your journey with Vektor. We’re here to help with any questions or queries, so please feel free to reach out to us any time:
Please let us know if you have any feedback whatsover - we’d be happy to hear from you!