Giter Site home page Giter Site logo

protocol-v2's People

Contributors

chanharryhk avatar kafitz avatar kevinzhangto avatar tommy4241 avatar ztcrypto avatar

Watchers

 avatar  avatar  avatar

Forkers

ali-hassan

protocol-v2's Issues

Inclusion of ToB audit report is misleading

In light of the recently published post-mortem, I was reviewing the existing audit coverage for this version of the protocol and saw that the Trail of Bits audit is included (it was imported with the rest of the audits in #73).

Having read the ToB audit when it was first published, I had assumed it was for V1. Slightly confused, I attempted to retrieve the commit specified in the report (906bd5274dcd07c458e6bbd6f13adced873ac952), only to realise it really was for the V1 repo.

Whilst more communication is certainly better when it comes to security audit coverage, I think this communication would benefit from more clarity surrounding what exactly has been audited by who. I suppose the easiest fix would be to create subdirectories for each protocol version and have the relevant reports contained within those?

Audit Summary Checklist

  • Issue #36 (Oracle Front Run):
    PR: Will set up AMM infra post audit see discussion here new issue here

  • Issue #37 (Missing Proxy Protection)
    PR here

  • Issue #38 (DepositWithWhitelist Validation)
    PR here

  • Issue #39 (Unclear Error)
    PR here

  • Issue #40 (Emergency State Clarification)
    PR here

  • Issue #41 (Transactable Check)
    PR: Is intentional see discussion here

  • Issue #42 (Protected Function)
    PR here

  • Issue #43 (Verification)
    PR here

  • Issue #44 (newAssimilator Definition)
    PR here

  • Issue #45 (Overwriting Curve)
    PR here

  • Issue #46 (Potential Time Lag)
    PR here

  • Issue #47 (Unnecessary Function)
    PR here

  • Issue #48 (Library Update)
    PR here

  • Issue #49 (Currency Check)
    PR here

  • Issue #50 (Equivalent Function)
    PR here

Polygon Foundry Deployment Issue

There are problems with deploying ANY contracts through foundry's forge create as well as forge script both don't work under any RPC i.e. alchemy. I even tested with multiple gas multipliers with no luck. Will need to open up an issue with foundry. Current work around will use a hardhat project to deploy. Mainnet should be working fine as I have tested on Goerli.

[] Opening up foundry issue for polygon ProviderError(JsonRpcError(JsonRpcError { code: -32000, message: "transaction underpriced", data: None }))

Update Readme

  • deploy locally
  • testing
  • Descriptions of functions / documentations

Flashloans

After some research probably should be using uniswapv3 code. Angle and aave doesn't fit what we're looking for i.e. mint flashloans.

Get Curve Discrepancy

Old CurveFactory Contract

function getCurve() encodes id as bytes32 curveId = keccak256(abi.encode(_baseCurrency, _quoteCurrency));
which aligns with
newCurve() encoding id as bytes32 curveId = keccak256(abi.encode(_baseCurrency, _quoteCurrency));
ref: https://github.com/dfx-finance/protocol/blob/main/contracts/CurveFactory.sol#L31-L46

New CurveFactoryV2 Contract

function getCurve() only has one param bytes32 curveId = keccak256(abi.encode(_token));
which DOES NOT align with
newCurve encoding with old id as bytes32 curveId = keccak256(abi.encode(_info._baseCurrency, _info._quoteCurrency));
ref: https://github.com/dfx-finance/protocol/blob/v2/contracts/CurveFactoryV2.sol#L85-L91

CI - Slither

Slither needs to ignore some of the dependancies inorder to work well with github actions

CI/CD

Hardfork tests don't work because the infura API is no longer supported. Will have to store in github actions.

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.