Git Product home page Git Product logo

drct_standard's Introduction

Daxia.us

Slack Slack Telegram DaxiaChat Twitter DaxiaOfficial MIT License

Tokenized Derivatives on Ethereum

Table of Contents

Contributing information

Dynamic Rate Cash Transaction Tokens

Instructions for quick start with Truffle Deployment

Follow the steps below to launch the Factory, Oracle and dependency contracts using Truffle.

Clone the repo, cd into it, and then:

$ git clone https://github.com/DecentralizedDerivatives/DRCT_standard

$ cd DRCT_standard

$ npm install

$ truffle compile

$ truffle migrate

$ truffle exec /scripts/Admin_01_setup.js

$ truffle exec /scripts/Admin_02_newfactory_new_oracle.js

$ truffle exec /scripts/Admin_07_contract_setup.js

You're ready to create DRCT tokens and contracts!

Step by step instructions on setting up your own DRCT contracts without truffle are available here: Detailed documentation for self setup

Overview

Dynamic Rate Cash Transaction (DRCT) Tokens are standardized contracts for trading risk and hedging exposure to underlying reference rates. DRCT token contracts are a risk management tool for cryptocurrency users that allow to long and/or short cryptocurrencies. Being long is a position where, if the price goes up, you make money and if it goes down, you lose money. The traditional way of being long an asset would be to simply own it. Being short is a position where if the price goes down you make money and if it goes up you lose money. If you own an asset and short it, your held asset loses value but your short position makes you money, helping you mitigate the price volatility risk.

DRCT contracts can provide more flexibility in terms of rate sensitivity and trading mechanisms than traditional OTC derivatives and allow for custom hedging and trading strategies not provided by traditional investments in cryptocurrency without minimum thresholds and with no intermediaries.

Additionally, DRCT tokens allow users to long or short assets that are non-native to Ethereum (like Bitcoin, Monero, Stellar, etc...) with Ether or any other ERC20 token.

Picture of contract creating short and long tokens

DRCT contracts start with a "creator" and are given a rate/duration/start date combination. Ether is locked as collateral in the smart contract by the creator. Short and Long Tokens are issued to the creator and represent the payouts of the contract. These tokens can be posted for sale on the Daxia Bulletin or with partner exchanges. On the end date of the contract, the tokens are paid out from the collateral (to whoever is holding them at that point in time) based on the change in the underlying rate.

All DRCT tokens ascribe to ERC20 specifications and can trade on any centralized or decentralized exchange.

A deep dive in methododology is available here: In-Depth Overview

Useful Links

If you have questions, ask us on Slack: https://deriveth.slack.com/

DAPP: http://dapp.daxia.us/

Oracle Methodology can be found at: https://github.com/DecentralizedDerivatives/Public_Oracle

Metamask - www.metamask.io

Truffle - http://truffleframework.com/

Maintainers

@themandalore
@brendaloya

How to Contribute

Join our slack, shoot us an email or contact us:

Any contributions are welcome!

Copyright

DDA Inc. 2018

drct_standard's People

Contributors

themandalore avatar brendaloya avatar bradleystachurski avatar esakthi avatar blascon76 avatar

Stargazers

 avatar  avatar Rob avatar Osuke avatar Barry G avatar Joshua Herman avatar Tai Helsel avatar Alex avatar Marco Jardim avatar

Watchers

James Cloos avatar  avatar  avatar Awarc avatar  avatar  avatar Rob avatar

drct_standard's Issues

Decentralized Oracle

Move contracts to the /Public_oracle for a completely decentralized experience

Add ListDDA getters for Dapp

In ListDDA function (add a bool for long/short)
Add getters:
function getLongTokens
function getShortTokens
which return an all of the addresses for long and short tokens.

Autopay script

I have a draft in the code, but we also need to put the scripts into the testing file so we can ensure accuracy

Adopt a delegatecall-type structure for swaps

"Adopt a delegatecall-type structure for swaps. The general idea is that you have an interfacing contract, which forwards delegatecall requests to the TokenToTokenSwap contract. The obvious benefit is that you shouldn't have to deploy TokenToTokenSwap more than a single time - the only thing you'll need to deploy each time is that interfacing contract, which shouldn't really be that expensive. An additional benefit is that you could, with a bit of work, structure this in such a way that TokenToTokenSwap becomes pretty simple to upgrade." Alex W.

website error

I was reading the drct readme and clicked on the link to http://dapp.ddacoop.org/
It started opening http://dapp.ddacoop.org/portfolio, but then failed:

screen shot 2018-07-14 at 4 38 35 pm

Full details:
Unhandled Rejection (Error): Provider not set or invalid
▼ 10 stack frames were expanded.
InvalidProvider
node_modules/truffle-contract/node_modules/web3/lib/web3/errors.js:34
sendAsync
node_modules/truffle-contract/node_modules/web3/lib/web3/requestmanager.js:76
get
node_modules/truffle-contract/node_modules/web3/lib/web3/property.js:116
(anonymous function)
node_modules/truffle-contract/contract.js:512
detectNetwork
node_modules/truffle-contract/contract.js:503
deployed
node_modules/truffle-contract/contract.js:451
tryCatch
node_modules/regenerator-runtime/runtime.js:62
invoke
node_modules/regenerator-runtime/runtime.js:296
step
http://dapp.ddacoop.org/static/js/bundle.js:181431:191
(anonymous function)
http://dapp.ddacoop.org/static/js/bundle.js:181431:110
▲ 10 stack frames were expanded.
componentWillMount
src/components/CashOut/CashOut.js:48
45 | };
46 |
47 | componentWillMount() {

48 | this.getMyBalance().then((result)=>{
49 | console.log('res',result);
50 | });
51 | }
View compiled
▼ 15 stack frames were expanded.
callComponentWillMount
node_modules/react-dom/cjs/react-dom.development.js:6872
mountClassInstance
node_modules/react-dom/cjs/react-dom.development.js:6968
updateClassComponent
node_modules/react-dom/cjs/react-dom.development.js:8337
performUnitOfWork
node_modules/react-dom/cjs/react-dom.development.js:11814
workLoop
node_modules/react-dom/cjs/react-dom.development.js:11843
renderRoot
node_modules/react-dom/cjs/react-dom.development.js:11874
performWorkOnRoot
node_modules/react-dom/cjs/react-dom.development.js:12449
performWork
node_modules/react-dom/cjs/react-dom.development.js:12370
performSyncWork
node_modules/react-dom/cjs/react-dom.development.js:12347
requestWork
node_modules/react-dom/cjs/react-dom.development.js:12247
scheduleWorkImpl
node_modules/react-dom/cjs/react-dom.development.js:12122
scheduleRootUpdate
node_modules/react-dom/cjs/react-dom.development.js:12710
render
node_modules/react-dom/cjs/react-dom.development.js:16069
(anonymous function)
node_modules/react-dom/cjs/react-dom.development.js:16488
legacyRenderSubtreeIntoContainer
node_modules/react-dom/cjs/react-dom.development.js:16484
▲ 15 stack frames were expanded.
./src/index.js
src/index.js:7
4 | import Main from './components/Main';
5 | import 'normalize.css';
6 |
7 | ReactDOM.render(
8 |
9 |


10 | ,
View compiled
▼ 6 stack frames were expanded.
webpack_require
/app/webpack/bootstrap 412a0c409990030ab329:678
fn
/app/webpack/bootstrap 412a0c409990030ab329:88
(anonymous function)
http://dapp.ddacoop.org/static/js/bundle.js:188886:37
webpack_require
/app/webpack/bootstrap 412a0c409990030ab329:678
(anonymous function)
/app/webpack/bootstrap 412a0c409990030ab329:724
global code
http://dapp.ddacoop.org/static/js/bundle.js:726:12
▲ 6 stack frames were expanded.
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.

Enhanced Exchange Features

Whether a link to 0x or just a way to:
-Partially Fill orders

    • Party places order for selling a large amount at a certain price
    • Parties can then buy one or more at that price

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.