Coder Social home page Coder Social logo

pinkdiamond1 / solo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sc-forks/solo

0.0 1.0 0.0 2.77 MB

dYdX V2 Margin Trading Protocol

License: Apache License 2.0

Shell 0.10% JavaScript 2.55% Python 0.96% TypeScript 71.90% Dockerfile 0.04% Solidity 24.45%

solo's Introduction

Ethereum Smart Contracts and TypeScript library used for the dYdX Solo Trading Protocol. Currently used by trade.dydx.exchange

Full Documentation at docs.dydx.exchange

Table of Contents

Documentation

Check out our full documentation at docs.dydx.exchange

Install

npm i -s @dydxprotocol/solo

Contracts

Mainnet

Contract Name Description Address
SoloMargin Main dYdX contract 0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e
PayableProxyForSoloMargin WETH wrapper proxy 0xa8b39829cE2246f89B31C013b8Cde15506Fb9A76
PolynomialInterestSetter Sets interest rates 0xaEE83ca85Ad63DFA04993adcd76CB2B3589eCa49
Expiry Handles account expiries 0x0ECE224FBC24D40B446c6a94a142dc41fAe76f2d
ExpiryV2 Handles account expiries (version 2) 0x739A1DF6725657f6a16dC2d5519DC36FD7911A12
DaiPriceOracle Price oracle for DAI 0x787F552BDC17332c98aA360748884513e3cB401a
WethPriceOracle Price oracle for WETH 0xf61AE328463CD997C7b58e7045CdC613e1cFdb69
UsdcPriceOracle Price oracle for USDC 0x52f1c952A48a4588f9ae615d38cfdbf8dF036e60
AdminImpl SoloMargin library containing admin functions 0x8a6629fEba4196E0A61B8E8C94D4905e525bc055
OperationImpl SoloMargin library containing operation functions 0x56E7d4520ABFECf10b38368b00723d9BD3c21ee1
LiquidatorProxyV1ForSoloMargin Proxy contract for liquidating other accounts 0xD4B6cd147ad8A0D5376b6FDBa85fE8128C6f0686
LimitOrders Contract for making limit orders using dYdX funds 0xDEf136D9884528e1EB302f39457af0E4d3AD24EB
SignedOperationProxy Contract for sending signed operations on behalf of another account owner 0x401dca7116d1CACb3c3bc1B4acE16fC87f7EfaBa
Refunder Allows sending of funds to other accounts 0x0ECE224FBC24D40B446c6a94a142dc41fAe76f2d

Security

Independent Audits

The smart contracts were audited independently by both Zeppelin Solutions and Bramah Systems.

Zeppelin Solutions Audit Report

Bramah Systems Audit Report

Code Coverage

All production smart contracts are tested and have 100% branching code-coverage.

Vulnerability Disclosure Policy

The disclosure of security vulnerabilities helps us ensure the security of our users.

How to report a security vulnerability?

If you believe you’ve found a security vulnerability in one of our contracts or platforms, send it to us by emailing [email protected]. Please include the following details with your report:

  • Description of the location and potential impact of the vulnerability;

  • A detailed description of the steps required to reproduce the vulnerability

Scope

Any vulnerability not previously disclosed by us or our independent auditors in their reports

Guidelines

We require that all reporters:

  • Make every effort to avoid privacy violations, degradation of user experience, disruption to production systems, and destruction of data during security testing

  • Use the identified communication channels to report vulnerability information to us

  • Keep information about any vulnerabilities you’ve discovered confidential between yourself and dYdX until we’ve had 30 days to resolve the issue

If you follow these guidelines when reporting an issue to us, we commit to:

  • Not pursue or support any legal action related to your findings

  • Work with you to understand and resolve the issue quickly (including an initial confirmation of your report within 72 hours of submission)

  • Grant a monetary reward based on the OWASP risk assessment methodology

Development

Compile Contracts

Requires a running docker engine.

npm run build

Compile TypeScript

npm run build:js

Test

Requires a running docker engine.

Start test node:

docker-compose up

Deploy contracts to test node & run tests:

npm test

Just run tests (contracts must already be deployed to test node):

npm run test_only

Just deploy contracts to test node:

npm run deploy_test

Maintainers

License

Apache-2.0

solo's People

Contributors

brendanchou avatar antoniojuliano avatar prettymuchbryce avatar

Watchers

 avatar

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.