Giter Site home page Giter Site logo

oasis-direct's Introduction

Oasis Direct

Oasis.Direct is a convenient and user friendly fully-decentralized way to change tokens, especially DAI/ETH and DAI/ERC-20 token pairs.

You don’t need to think about wrapping/unwrapping ETH (and other non ERC-20 compliant tokens), you don’t need to worry about the current liquidity on the exchange and you are always guaranteed the best price you can get from Oasis.DEX exchange.

Deployments

Sections in Oasis Direct Web App

  1. Exchange

    • Exchange tokens in matters of seconds. Just provide the amount you want to sell or the amount of the token you want to get. The application will automatically check the liquidity pool for orders that will fulfill yours. You receive information how much is the rate and the gas cost for the transaction in ETH.
    • In order to select token, just click on the square box where the token icon is and a list with the supported tokens will appear. If you select token that is part of the trade pair, tokens will just swap.
    • Another way to swap tokens is to click the arrows icon.
    • To proceed with transaction, please read the Terms of Service and accept them by marking the check box.
    • If given account doesn't have insufficient funds to trade an error message will be displayed.
    • If given order can't be fulfilled because there aren't enough corresponding orders, there will be notification.
    • Trading ETH for ERC20 Token wil require only a single transaction. You can follow the status of the transaction on Etherscan by clicking the transaction box.
    • Trading ERC20 Token for ETH or ERC20 Token for ERC20 Token will require 2 transaction initially. Once you go through those 2 transaction every other time you will only a single transaction. See FAQ section for more details.
  2. Export Trades

    • Exports trade history for the given addresses in the form of a csv file.
    • As many address as one want can be added.
    • Only OasisDEX is supported right now but in the future we plan to support many more exchanges

FAQ

What is Oasis.Direct ?

Oasis.Direct is the most convenient, fully-decentralized way to change tokens. You don’t need to think about wrapping/unwrapping Ether or any other Ethereum token, you don’t need to worry about the current liquidity and you are always guaranteed the best available price on Oasis.DEX. Simply specify the amount that you want to trade and confirm the transaction.

Are you going to support more trading pairs in the future ?

Yes, more trading pairs will be supported in the future. In the beginning the following pair is available: DAI/ETH.

Why do I sometimes need to confirm two transactions, and sometimes only one ?

Each trading pair requires a one-time transaction per Ether address to be enabled for trading. Once that is done, all subsequent trades will require confirming just one Ethereum transaction. You just need to confirm two Ethereum transactions if it is the first time you are trading a particular pair from the new Ethereum address.

What does “Order estimation may vary” mean ?

The slippage limit value is used to create a Limit Order for your transaction. If this Limit Order cannot be immediately completely filled on Oasis.DEX, the transaction will fail. It’s impossible to guarantee that your order will succeed, since it is being matched with other orders on Oasis.DEX in real time. The fact that Oasis.Direct uses Limit Orders, rather than Market Orders, ensures that a user won’t experience unexpected slippage.

What happens if the transaction price exceeds the given threshold ? Will I still pay gas price for the transaction ?

Yes, you will still pay for gas. Bear in mind that the likelihood that your order can’t be filled is quite low, and will only occur if the price has moved in excess of the slippage limit in the time between you receiving the quote and your transaction getting mined.

Why is the “order estimation vary indicator” (threshold) different for some pairs ?

The slippage limits were decided by analyzing the volatility and book depth historically on the Oasis.Dex for the given pairs. The limit might be adjusted accordingly if the market on Oasis.DEX changes. In the future, you will be able to set the slippage limit manually according to your personal preference.

Can you list order estimation variations (thresholds) for all assets/tokens ?

Right now there is a fixed threshold of 2% for DAI/ETH pair.

What is the maximum value I can trade through Oasis.Direct ?

There is no maximum size limit. However, larger orders impact the market more, and so may be quoted poorer prices. They are also more likely to fail by exceeding the slippage limit

I want to submit a big Sell/Buy Order. Can I see how likely my order will fail due to exceeding threshold limit ?

This functionality will be included in the future release of Oasis.Direct

Why there is a minimum trading limit ?

As the gas cost for a transaction is fixed and doesn’t depend on the amount you want to trade, the bigger amount, the less (percentage-wise) you pay for gas. Minimum trade sizes were introduced to make sure that the total transaction cost is minimal with respect to the traded amount. Currently the minimum trade sizes are:

  • 30 DAI
  • 0.03 ETH

Note that both buy and sell amounts of a transaction need to be above the minimum trade size.

You said Oasis.Direct is fee-less. Do I still need to cover gas cost ?

Yes, even though there are no fees, you still need to cover the gas cost of the transaction. The gas price is estimated according to the current transaction details. To learn more about gas and why it is needed for Ethereum transactions, check this excellent guide.

Why does the transaction confirmation takes so long? What can I do to speed it up ?

Oasis.Direct is powered by fully decentralized, on-chain Smart Contracts. The transaction confirmation time depends on the current state of the Ethereum blockchain. You can increase the speed of confirmation by increasing the gas price for your transaction - please refer to this guide that explains all the mechanics of the gas price and its effect on the speed of transactions.

Development

Starting the app

yarn
yarn start

E2E tests

First, make sure you have app and oasis-localnode already running. Then run all cypress tests:

yarn cypress:run

To develop:

yarn cypress:dev

If you're trying to debug test failure on CI visit Cypress Dashboard

CI

Sometimes, you might want to update localnode version used in tests. There is a LOCALNODE_SHA in .circleci/config.yml. This SHA should match top of the master branch in localnode repository.

Env variables

OASIS_GANACHE_COMPATIBILITY=1                # optional, if enabled we are gonna adjust gas estimations
OASIS_HIDE_MKR=1                             # optional

oasis-direct's People

Contributors

gbalabasquer avatar krzkaczor avatar luke7211 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oasis-direct's Issues

oasis.direct mobile mockup

Hey guys,

I am finished up the first design mockups for oasis.direct on mobile.

Starter Page

mobile-starter

Finalize Page

mobile-finalize

Calculating gas cost is triggered on each new digit entered

i.e. Scenario
0. Open dev tools.

  1. Enter for sell token - 0.1
  2. Put the cursor in front of the 1.
  3. Start putting 0's.
  4. Observe how many times Calculating gas cost is called.

Every time we change a digit ( remove / add ) gas calculation is triggered.

Implement a debounce function for the input.

Oasis.direct 2 - Requirement List

Hey guys,

I want to define the requirements/task for the next version of oasis.direct. The whole requirement plan is not written in stone so I would like to have more input from the whole oasis team. All those changes will be worked on after we moved the base project to a redux/react version which @peculiarity is started to work on.

oasis.direct widget requirements:

  • Including an interface/page to let the user set their own gas price and threshold limit (via exact price or percentage limit)
  • Native mobile widget implementation
  • Implementing an automatic way of dealing with the threshold for specific pairs. If the Ethereum network is clogged (which means it is harder to do market making), we should increase the threshold.

oasis.direct website requirement:

  • adding two new dashboard like widgets which are showing DAI markets and a 24 Hour Statistic of the oasis contract.
  • add an interace which shows the wallet address of the user
  • add an interface where the user can lookup their balances of each token asset.
  • add an indicator for connectivity.
  • add a transfer page

Oasis Direct 2 - Design

2018-03-27 14 08 51

Changes:

  • Change Price to Approx. Price
  • Add Price Slippage
  • Reposition the Gas Price and change from ETH to USD value.
  • Add the balance for each Asset Picker
  • Added advanced Settings Button
  • Insufficent funds warning message will now be shown beneath the order informations. With that people can now check prices without having actually the balance on their wallet.

Measurements:od-settings.zip
Settings Icon:

Disclaimer box should have a different behaviour

bildschirmfoto 2018-02-19 um 10 25 01

changes:

  • the whole box should not be clickable anymore
  • if you click on Terms and Condition a new tab should open up (link will coming soon)
  • Terms and Condition should have the color #448AFF

Tax Exporter Wireframes

od-exporter

Requirements:

  • Oasis should be the default Exchange
  • Etherdelta and 0x are disabled until we are adding the functionality
  • After the user clicked on the button Create Report, it is not possible for him to start the process again while the exporter is in process.

What's the fifth paremeter in the offer function?

I'm working on a market making bot for OasisDex, I notice that when placing an order via oasisdex, there is a fifth parameter (uint256 pos)?

It seems it's not required as orders are accepted without it but I assume it serves a purpose? Do I need it or can it be safely ignored?

Input fields getting cleared

  1. Enter some amount in the pay token input field
  2. Use one of the token pickers to select a token
  3. The token picker is opened but instead of selecting a new token, just close the picker
  4. The input fields are cleared.

Expected behavior: The input fields shouldn't be cleared if no token was selected

widget redesign v2

I have updated the recent oasis.direct design mockup with the help of the team feedback:

oasis-direct-v2

changes:

  • legal agreement information box with checkbox added
  • replaced order information from the bottom to the top
  • added token description to the picker
  • changed the price to show the base/quote currency
  • renamed "fee" to simple "gas cost"
  • changed the widget size to 470 w 420 h

Notification about completing conversion

This is a feature suggestion on top of #50

It would be fantastic if at the end of conversion process the widget did javascript code of window.postMessage({type: 'oasis-direct.conversionCompleted', ...}, '*'). This would allow the nesting party to trigger it's own logic after conversion and integrate oasis.direct widget more smoothly.

every token should have a defined minimum value for trading

While testing oasis.direct on the mobile ethereum client cypher I am realising that it doesn`t make sense to give the user the possibility to exchange 0,0001 DAI. We need to define a min value for each token which is traded on oasis.direct.

For the first release we are going to have tokens with min value:

  • ETH 0,03 ETH
  • MKR 0,03 MKR
  • DAI 30 DAI

Transaction execution error on gas cost calculation

Tested only on KOVAN so far
  1. Create new (fresh) account
    1 Get some MKR token ( https://oasisdex.com)
  2. Go to oasis.direct
  3. Select MKR -> ETH trading pair
  4. Gas calculation throws an error in the dev console and the Gas cost loading spinner keeps on spinning. (error: Uncaught (in promise) Error: Error: Transaction execution error. )

Tried with DAI and it worked fine.

Oasis Direct as Widget that can be Embedded

Oasis Direct widget (without TAX export ) should be done in a way that 3rd party providers can inject it into their web application and use it as a standalone widget.

Proper documentation should be create as well.

Landing page

Migrate the landing page from the oasis-direct application to the base one.
Integrate the widget in there

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.