InverseFinance / anchor

BSD 3-Clause "New" or "Revised" License
28 stars 25 forks source link

Anchor v1 #1

Closed nourharidy closed 3 years ago

nourharidy commented 3 years ago

Architecture overview for reviewers:

Anchor is a fork of Compound. The main compound contracts (CToken, Comptroller, etc are not changed). The only change to the Compound protocol is the PriceOracle implementation which plugs into Chainlink feeds.

The main goal of the Anchor project is to re-use Compound's loan and debt management plumbing for the purpose of synthetic asset creation (Turning Compound into MakerDAO/Synthetix). This is achieved by creating an ERC20 token for each synth, minting it and supplying it exclusively to the protocol which will lend it to others in exchange for collateral.

This achieves essentially the same architecture as MakerDAO but with few important differences:

The main new contracts introduced are the following:

Initial launch phase: The main goal during the launch is to be as lean as possible. Anchor is very ambitious project but it must first be proven in its most simple form:

As a reviewer, you should be verifying that the architecture and all features above are represented correctly in the code base. This not only includes the contracts source code, but also the deployment scripts located at deploy/ directory. There is also a single unit test for the Oracle contract in the test/ directory given the math involved unlike other contracts. There's no need to fully review the entirety of the Compound code base. However, it is important to ensure that these components will function as intended combined with our code. Only Comptroller.sol, Unitroller.sol, CErc20Immutable.sol, CEther.sol, JumpRateModelV2.sol and WhitePaperInterestRateModel.sol from Compound's code are used in our protocol in addition to our own contracts.

Let me know if there's anything I can help with.