Skip to content
Source code for Vapaée DEX - website and smart contract
C++ TypeScript HTML Shell CSS JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Vapaée DEX - source code

current version: DELUXE (v3.4.0)

git clone
npm i
cd script

features for next version - GOLDEN (v4.x.x)

  • Critical

  • Normal

    • Incentive UI creation

      • each UI should be registered as such (name, url, picture, etc) with an account name to which receive the earnings from fees
      • modify table of orders to include the account name of the UI being used.
      • redirect earnings
        • when charging fees, fonds must be to the account of the UI that is being used
        • when withdrawing, if after withdraw the user still has microfonds redirect those fonds to the UI account as earning.
        • the order and withdraw functions should include the account name of the UI.
    • Integration with REX

      • study the REX contract to understand how to get the data
      • create a #vapaee/rex library to interact with this component from the blockchain
      • modify user account page to reflect REX status (Balance Breakdown)
    • Integration with Trail

      • study the Trail 2.0 contract to understand how does it work
      • how is it possible for trail system to know how much tokens the user has inside the DEX?
    • Deposits and order funds should be reflected in user account page

    • DAO. Telos DEX should be subject to modifications through the Trail 2.0 system

      • Set a global list of variables and change contract behavior to adjust to those variables:
        • banning a token: the token will not allowed te be traded!! should not be listed either (this is up to the UI)
        • delisting token: is not allowed te be traded!! but is not banned, can be shown (this is up to the UI)
        • maker fees: apply percent to taker money and give to the account of the UI maker is using
        • taker fees: apply percent to maker money and give to the account of the UI taker is using
        • set token as currency: allow people to create markets with this token as currency
        • history pruning: to release RAM people can decide to prune the oldest history entries
    • create a footer

      • Sections
        • DAO
        • Tutorials
        • Register UI
    • allow token admin to change admin in a separated action

    • allow UI to filter tokens easily with a config json file

    • BP Multisig

    • more skins

    • check all interface in a cell phone

  • Issues

    • Currently all markets scopes are names <TokenA><dot><TokenB> but limited to 12 chars. If token symbols are too big this can't be done. A separated table with scopes and IDs must be created and all current markets should be replaced carefully to the new structure.
    • change the concept "token owner" for "token admin" because is more self-explanatory (thanks to SrKnight for the suggestion)
  • Wishlist

    • wallets support

    • UI

      • in the order editor panel to be able to cancel more than one order at a time
      • cache the blockhistoy data in client.
      • show personal activity in account page
      • get Dapp actually listed on Lynx Explorer
      • All time entries will show time in terms of how long ago that entry was recorded. Then concrete dates if is too long ago.
      • modificate interaction to create two actions in a sigle transaction to bypass the deposit and withdraw steps.
      • delegate the signing of transactions and be able to be embeded inside an iframe. This is for to embed Vapaée as a Telos DEX (like newdex)
    • Contract

      • autowithdraw. User shoud be able to set an order to autowithdraw if completed.
      • al history entries should be recorded as an internal inline action instead of using RAM. Both solution can live together.
      • the same admin can register several tokens and define one of them as the currency for the group. Then only markets with tokens within the group are allowed only one of them is the gourp currency. In this case the admin does not need DAO approval to set as currency.

features for version - DELUXE (v3.x.x)

  • Critical

    • Trade any pair
      • smart contract adaptation
        • verify that current smart contract already accepts any pair, make any adjustments if necessary
        • execute by console a whole use case of creating a new market XXX/YYY not involvind TLOS
      • website adaptation
        • new "Markets" Page.
          • Currency selector as header (comobity/currency, comobity/TLOS by default)
          • List of tokens that are currently being traded in the currency selected
          • "Create new Market" button, and modal to create a sell/buy order in a non existing yet market (comobity/currency)
        • Adapt "Trade" Page
          • verify trade-page component does not base its behavior on the assumption that TLOS is always the currency.
          • verify every component admits any given pair comobity/currency, recode if not
          • creates new component to show list of markets instead of just tokens
        • Adapt "Tokens" Page.
          • dex service must resolve token price based on all markets it participates
          • create a new telos card deck
            • create a new telos card with bigger icons
        • Adapt "Home" Page.
          • show top 3 of concrete markets, based on volume translated to USD
  • Normal

    • Material icons on navbar
    • Invert tokens pair
      • inside trade market a button will switch commodity / currency places.
    • Free to join
      • Tokens Page should show your Own Tokens
        • Create a brand new standar eosio token on vapaeetokens smart contrat and issue tokens
        • Register an existing token to be listed
        • form to update registered tokens page content (links, news, videos)
    • Token info page
      • Smart contract should have a table to hold token data (links, videos, tweets, etc)
      • Tokens page should have on each token a info button to redirect to tokens page
      • Token page shows Token symbol, project name and description, token stats, and a list of contents and links taked from owner submits.
      • UI should allow token admin to easily update token data content
    • Timezone
    • Contract Events
      • list all possible actions and categorize them in terms of which one should be sending a message to whom.
      • send and event inline action to handler contract
      • UI should allow token owner to manage event subscription
    • Skins
      • combobox to select one of three prototype skins
      • handler, on skin change, delete current style, install new style system
      • implement three simple color prototypes of skins
  • Issues

    • we lost communication with sqrl wallet after ScatterJS update. Consider rollback while not supporting Lynx

features for version - PREMIUM (v2.x.x)

  • Critical

    • PWA
    • Responsive
      • generate an event onResize for all panels to subscribe
      • each panel should be able to calculate the area in which it should be deployed and set a element class that reflects it
      • each panel must be displayed taking into account the area it has to be deployed (based on the class of the element)
      • Cell phones design:
        • trade page
          • chart component
          • token selection component
          • order editor component
          • history component
          • order book component
        • account page
          • wallet component
  • Normal

    • the height of the token list panel should equal the height of chart panel
    • add current version number on the HOME page. Below the subtitle with small print
    • button "deposit" to the right of token balances (temporal solution)
    • Wallet Panel (USD):
      • create service to query Telos price in coingecko regularly.
      • Combobox sup-right (to the right of the title) to choose whether to express everything in USD, TLOS, EUR, EOS, etc ...
      • Button to the right of the title "Deposits" that says "withdraw" that if you touch it, switch to "back to prices"
      • Button to the right of the title "Balances" that says "deposit" that if you touch it, switch to "back to prices"
      • To the right of each deposit or balance put the price in USD. If the previous button is pressed, put a button that says "withdraw" / "deposit"
    • Total balance in USD in the header of the account next to total balance
    • Add max and min of the last 24h for each token
    • Activity feedback on home page: how many users, transactions per day, deposits, withdrawals, earnings
      • Create new table on smart contract to store all user activity
      • Create a new component on home page to show last X activity entries
        • Transactions should appear in color
        • click on name account should redirect to account page
        • click on transaction detail should redirect to trade market page
    • add and test support for the lynx wallet
      • migrating drom eosjs to eosjs2
      • adding EOS-Lynx ScatterJS plugins
      • fill EOS-Lynx add Dapp form
      • waiting EOS-Lynx to comunicate about Dapp submition
      • solve input vitual-keyboard bug. Implement a modal with an in-app virtual keyboard
      • get Dapp actually listed on Lynx Explorer
      • test Dapp-wallet comunication. Is it really integrated ??
  • Details:

    • add Portugues language (Thanks to Fabiana Cecin)
    • highlight the WP navbar button
    • change the Beatitude icon (HEART)
    • mouse wheel on the chart must advance faster the further back in time it goes.
    • make the TLOS deposit clickable so it adds the maximum possible order amount from the token Spot Account into the order form (Ryan Jones request)
    • show non-validated tokens in the wallet balance and make them unable to be deposited
  • Easy bugs

    • there's a bug when calculating the payment
    • the total number of buy orders always displays: 0 orders - 0.0000 TLOS
    • do not show the resource panels or balance when not logged in and with low resolution
    • tokens with more volume should be shown on top on the token list
    • in the order editor panel the loading of the cancels do not correspond well. (buy orders are mixed with sell orders)
    • in the order editor panel sometime own order don't appear. It should update regularly as history panel does.
  • Hard bugs

    • review the list of own orders within the order editor panel because it doesn't display properly sometimes
    • check the login button.
      • show error messages!
      • throw errors in console
      • verify if the user does have Telos mainnet configured in the wallet.
    • At the moment infinite listeners are being added to the onresize event but I am not taking them out. They accumulate and degrade the performance, badly.
  • Wishlist

    • in the order editor panel to be able to cancel more than one order at a time
    • adapt the text of the WP to reflect the Review Video problem and say that 30K TLOS will be returned back to eosio.saving
    • pass all the code to a new repository dedicated to Vapaée DEX
    • change the algorithm that calculates the summary and base it on the blockhistory.
    • cache the blockhistoy data.
    • remember the choice of language (cookie)
    • remember the choice of base currency (cookie)
    • remember the last market visited (in memory) and make the 'Trade' nav button to go there instead allways to CNT/TLOS
    • add date in history entries
    • show personal activity in account page
You can’t perform that action at this time.