Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dydxprotocol/perpetual

Package Overview
Dependencies
Maintainers
8
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dydxprotocol/perpetual

Ethereum Smart Contracts and TypeScript library used for the dYdX Perpetual Contracts

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39
increased by680%
Maintainers
8
Weekly downloads
 
Created
Source

CI Status NPM Coverage Status License Telegram

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

For additional documentation, see the Protocol Overview, BTC–USDC Market Specification, and docs.dydx.exchange.

Table of Contents

Documentation

A description of the protocol can be found in the Protocol Overview. For more info on applications of the protocol, including examples, you may refer to the BTC–USDC Market Specification which provides details on a specific market using the protocol. Additional documentation about dYdX is available at docs.dydx.exchange.

Install

npm i -s @dydxprotocol/perpetual

Contracts

Mainnet

Contract NameDescriptionAddress
PerpetualProxyProxy contract and entrypoint for the core protocol0x07aBe965500A49370D331eCD613c7AC47dD6e547
PerpetualV1Upgradeable logic contract for the core protocol0x364508A5cA0538d8119D3BF40A284635686C98c4
P1FundingOracleFunding rate oracle0x4525D2B71f7f018c9EBddFcD336852A85404e75B
P1MakerOraclePrice oracle0x538038E526517680735568f9C5342c6E68bbDA12
P1OrdersTrader contract for limit and stop-limit orders0x3ea6F88eC8F7b24Bb3Ad206fa80124210e8e28F3
P1LiquidationTrader contract for liquidations0x9C6C96727d1Cf2F183a8ef77E274621F26D728f8
P1DeleveragingTrader contract for deleveraging0x1F8b4f89a5b8CA0BAa0eDbd0d928DD68B3357280

Security

Independent Audits

The smart contracts were audited independently by Zeppelin Solutions at commit c5e2b0e, excluding P1Orders.sol.

Zeppelin Solutions Audit Report

Code Coverage

All production smart contracts are tested and have 100% line and branch 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 security@dydx.exchange. Please include the following details with your report:

  • A 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

Keywords

FAQs

Package last updated on 20 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc