Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-928]: Remove legacy scripts and files #359

Merged
merged 5 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .soliumignore

This file was deleted.

15 changes: 0 additions & 15 deletions .soliumrc.json

This file was deleted.

138 changes: 0 additions & 138 deletions Makefile

This file was deleted.

80 changes: 7 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ We detail a few of the core contracts in the Venus protocol.

<dl>
<dt>VToken, VBep20 and VBNB</dt>
<dd>The Venus vTokens, which are self-contained borrowing and lending contracts. VToken contains the core logic and VBep20, VBUSD, VSXP and VBNB add public interfaces for Bep20 tokens and bnb, respectively. Each VToken is assigned an interest rate and risk model (see InterestRateModel and Comptroller sections), and allows accounts to *mint* (supply capital), *redeem* (withdraw capital), *borrow* and *repay a borrow*. Each VToken is an BEP-20 compliant token where balances represent ownership of the market.</dd>
<dd>The Venus vTokens, which are self-contained borrowing and lending contracts. VToken contains the core logic and VBep20, VBUSD, and VBNB add public interfaces for BEP-20 tokens and bnb, respectively. Each VToken is assigned an interest rate and risk model (see InterestRateModel and Comptroller sections), and allows accounts to *mint* (supply capital), *redeem* (withdraw capital), *borrow* and *repay a borrow*. Each VToken is an BEP-20 compliant token where balances represent ownership of the market.</dd>
</dl>

<dl>
<dt>Comptroller</dt>
<dd>The risk model contract, which validates permissible user actions and disallows actions if they do not fit certain risk parameters. For instance, the Comptroller enforces that each borrowing user must maintain a sufficient collateral balance across all vTokens.</dd>
<dt>Diamond Comptroller</dt>
<dd>The risk model contract, which validates permissible user actions and disallows actions if they do not fit certain risk parameters. For instance, the Comptroller enforces that each borrowing user must maintain a sufficient collateral balance across all vTokens. The Comptroller is implemented as a Diamond proxy with several facets (MarketFacet, PolicyFacet, RewardFacet, SetterFacet) corresponding to the particular parts of the Comptroller functionality.</dd>
</dl>

<dl>
Expand All @@ -30,17 +30,12 @@ We detail a few of the core contracts in the Venus protocol.
</dl>

<dl>
<dt>SXP</dt>
<dd>The Venus Governance Token (SXP). Holders of this token have the ability to govern the protocol via the governor contract.</dd>
<dt>Governor Bravo</dt>
<dd>The administrator of the Venus Timelock contracts. Holders of XVS token who have locked their tokens in XVSVault may create and vote on proposals which will be queued into the Venus Timelock and then have effects on other Venus contracts.</dd>
</dl>

<dl>
<dt>Governor Alpha</dt>
<dd>The administrator of the Venus timelock contract. Holders of XVS(SXP) token may create and vote on proposals which will be queued into the Venus timelock and then have effects on Venus vToken and Comptroller contracts. This contract may be replaced in the future with a beta version.</dd>
</dl>

<dl>
<dt>InterestRateModel</dt>
<dt>InterestRateModel, JumpRateModel, WhitepaperInterestRateModel</dt>
<dd>Contracts which define interest rate models. These models algorithmically determine interest rates based on the current utilization of a given market (that is, how much of the supplied assets are liquid versus borrowed).</dd>
</dl>

Expand All @@ -59,16 +54,6 @@ We detail a few of the core contracts in the Venus protocol.
<dd>Library for handling fixed-point decimal numbers.</dd>
</dl>

<dl>
<dt>SafeToken</dt>
<dd>Library for safely handling Bep20 interaction.</dd>
</dl>

<dl>
<dt>WhitePaperInterestRateModel</dt>
<dd>Initial interest rate model, as defined in the Whitepaper. This contract accepts a base rate and slope parameter in its constructor.</dd>
</dl>

### Documentation

Documentation is autogenerated using [solidity-docgen](https://github.com/OpenZeppelin/solidity-docgen).
Expand All @@ -82,63 +67,12 @@ To run venus, pull the repository from GitHub and install its dependencies. You
cd venus-protocol
yarn install --lock-file # or `npm install`

## Solidity Compiler Installation on MacOS

- Solidity smart contracts in venus-protocol use `solc` version 0.5.16

- To install solidity compiler `solc`, follow the instructions listed here:

1. clone `homebrew-ethereum` project that provides homebrew formulae for `solc`:

```sh
git clone [email protected]:ethereum/homebrew-ethereum.git
```

2. change to project directory

```sh
cd homebrew-ethereum
```

3. checkout the commit hash for version 0.5.16

```sh
git checkout 5df4d76a780813a0ad625619572afb358d46c1d4
```

4. Install compiler version 0.5.16 by executing command

```sh
brew install solidity@5
```

5. Verify the installed solidity version

```sh
solc --version
```

- the command should print the console log:

```
solc, the solidity compiler commandline interface
Version: 0.5.16+commit.9c3226ce.Darwin.appleclang
```

## Testing

Jest contract tests are defined under the [tests directory](https://github.com/VenusProtocol/venus-protocol/tree/master/tests). To run the tests run:

yarn test

## Integration Specs

There are additional tests under the [spec/scenario](https://github.com/VenusProtocol/venus-protocol/tree/master/spec/scenario) folder. These are high-level integration tests based on the scenario runner depicted above. The aim of these tests is to be highly literate and have high coverage in the interaction of contracts.

## Formal Verification Specs

The Venus Protocol has a number of formal verification specifications, powered by [Certik](https://certik.foundation/projects/swipe). The Certik Verification evaluates smart contracts for vulnerabilities and certifies their behavior with respect to a custom function specification.

## Testing

Contract tests are defined under the [tests directory](https://github.com/VenusProtocol/venus-protocol/tree/master/tests). To run the tests run:
Expand Down Expand Up @@ -229,4 +163,4 @@ For any concerns with the protocol, open an issue or visit us on [Telegram](http

For security concerns, please contact the administrators of our telegram chat.

© Copyright 2021, Venus Protocol
© Copyright 2023, Venus Protocol
89 changes: 0 additions & 89 deletions gasCosts.json

This file was deleted.

Loading
Loading