Giter Site home page Giter Site logo

perpetual-protocol / perp-curie-contract Goto Github PK

View Code? Open in Web Editor NEW
74.0 5.0 41.0 17.68 MB

Perpetual Protocol Curie (v2) core contracts

Home Page: https://perp.com

License: GNU General Public License v3.0

Shell 0.01% TypeScript 73.46% Solidity 26.54%
perpetual-protocol perpetual-protocol-v2 perpetual-futures smart-contracts optimism

perp-curie-contract's Introduction

banner

perp-curie-contract

@perp/curie-contract on npm @perp/curie-deployments on npm

This repository contains the core smart contracts for Perpetual Protocol Curie (v2).

Contract source code and metadata are also published as npm packages:

Get Started

Please check out:

Deployments

Perpetual Protocol Curie (v2) are deployed on Optimism mainnet (an Ethereum Layer 2 network).

Contract addresses:

You could also find the deployed contract addresses inside the npm package @perp/curie-deployments.

Local Development

You need Node.js 16+ to build. Use nvm to install it.

Clone this repository, install Node.js dependencies, and build the source code:

git clone [email protected]:perpetual-protocol/perp-curie-contract.git
npm i
npm run build

If the installation failed on your machine, please try a vanilla install instead:

npm run clean
rm -rf node_modules/
rm package-lock.json
npm install
npm run build

Run all the test cases:

npm run test

Changelog

See CHANGELOG.

Audit Reports

See audits.

Bug Bounty Program

This repository is subject to the Perpetual Protocol v2 bug bounty program, per the terms defined on ImmuneFi.

Grant Program

Projects, ideas and events that benefit Perpetual Protocol and its ecosystem are eligible for grants!

Related Projects


If any features/functionalities described in the Perpetual Protocol documentation, code comments, marketing, community discussion or announcements, pre-production or testing code, or other non-production-code sources, vary or differ from the code used in production, in case of any dispute, the code used in production shall prevail.

perp-curie-contract's People

Contributors

42bchen avatar daidoli avatar detoo avatar dylanyang0523 avatar kimiwu123 avatar lkblkb avatar lnxrp avatar opass avatar paco0x avatar perpdev avatar phchan9 avatar sillyleo avatar tailingchen avatar tempofeng avatar tienshaoku avatar twxia avatar vinta avatar wraecca avatar yurenju 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  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  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

perp-curie-contract's Issues

Access request to feeGrowthOutside specs notion page

/// @return all values returned can underflow per feeGrowthOutside specs;
/// see https://www.notion.so/32990980ba8b43859f6d2541722a739b
function getAllFundingGrowth(
mapping(int24 => GrowthInfo) storage self,
int24 lowerTick,
int24 upperTick,
int24 currentTick,
int256 twPremiumGrowthGlobalX96,
int256 twPremiumDivBySqrtPriceGrowthGlobalX96
) internal view returns (FundingGrowthRangeInfo memory) {

We're currently doing some uniswap v3/trident stuffs, accidentally we found some articles about the uniswap's underflow issue.

According to this (Uniswap/v3-periphery#164), I assume that this is why perpetual team does not use safemath on the fee growth calculation logic.

However, I cannot understand that how the under/overflow situation occurs. To resolve this, I wanna get an access to that notion page.

Thanks.

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.