@venusprotocol/venus-protocol 4.1.0-dev.1 → 4.1.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -78
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This repository is being audited. It has been temporarily frozen to avoid any unexpected change in the reviewed code. It will be unarchived in 10 days.
|
|
4
|
-
|
|
5
|
-
[](https://github.com/VenusProtocol/venus-protocol/actions/workflows/venus-protocol.yml)
|
|
1
|
+
[](https://github.com/VenusProtocol/venus-protocol/actions/workflows/cd.yml) [](https://github.com/VenusProtocol/venus-protocol/actions/workflows/ci.yml)
|
|
6
2
|
|
|
7
3
|
# Venus Protocol
|
|
8
4
|
|
|
@@ -20,12 +16,12 @@ We detail a few of the core contracts in the Venus protocol.
|
|
|
20
16
|
|
|
21
17
|
<dl>
|
|
22
18
|
<dt>VToken, VBep20 and VBNB</dt>
|
|
23
|
-
<dd>The Venus vTokens, which are self-contained borrowing and lending contracts. VToken contains the core logic and VBep20, VBUSD,
|
|
19
|
+
<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>
|
|
24
20
|
</dl>
|
|
25
21
|
|
|
26
22
|
<dl>
|
|
27
|
-
<dt>Comptroller</dt>
|
|
28
|
-
<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>
|
|
23
|
+
<dt>Diamond Comptroller</dt>
|
|
24
|
+
<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>
|
|
29
25
|
</dl>
|
|
30
26
|
|
|
31
27
|
<dl>
|
|
@@ -34,17 +30,12 @@ We detail a few of the core contracts in the Venus protocol.
|
|
|
34
30
|
</dl>
|
|
35
31
|
|
|
36
32
|
<dl>
|
|
37
|
-
<dt>
|
|
38
|
-
<dd>The Venus
|
|
39
|
-
</dl>
|
|
40
|
-
|
|
41
|
-
<dl>
|
|
42
|
-
<dt>Governor Alpha</dt>
|
|
43
|
-
<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>
|
|
33
|
+
<dt>Governor Bravo</dt>
|
|
34
|
+
<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>
|
|
44
35
|
</dl>
|
|
45
36
|
|
|
46
37
|
<dl>
|
|
47
|
-
<dt>InterestRateModel</dt>
|
|
38
|
+
<dt>InterestRateModel, JumpRateModel, WhitepaperInterestRateModel</dt>
|
|
48
39
|
<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>
|
|
49
40
|
</dl>
|
|
50
41
|
|
|
@@ -63,16 +54,6 @@ We detail a few of the core contracts in the Venus protocol.
|
|
|
63
54
|
<dd>Library for handling fixed-point decimal numbers.</dd>
|
|
64
55
|
</dl>
|
|
65
56
|
|
|
66
|
-
<dl>
|
|
67
|
-
<dt>SafeToken</dt>
|
|
68
|
-
<dd>Library for safely handling Bep20 interaction.</dd>
|
|
69
|
-
</dl>
|
|
70
|
-
|
|
71
|
-
<dl>
|
|
72
|
-
<dt>WhitePaperInterestRateModel</dt>
|
|
73
|
-
<dd>Initial interest rate model, as defined in the Whitepaper. This contract accepts a base rate and slope parameter in its constructor.</dd>
|
|
74
|
-
</dl>
|
|
75
|
-
|
|
76
57
|
### Documentation
|
|
77
58
|
|
|
78
59
|
Documentation is autogenerated using [solidity-docgen](https://github.com/OpenZeppelin/solidity-docgen).
|
|
@@ -86,63 +67,12 @@ To run venus, pull the repository from GitHub and install its dependencies. You
|
|
|
86
67
|
cd venus-protocol
|
|
87
68
|
yarn install --lock-file # or `npm install`
|
|
88
69
|
|
|
89
|
-
## Solidity Compiler Installation on MacOS
|
|
90
|
-
|
|
91
|
-
- Solidity smart contracts in venus-protocol use `solc` version 0.5.16
|
|
92
|
-
|
|
93
|
-
- To install solidity compiler `solc`, follow the instructions listed here:
|
|
94
|
-
|
|
95
|
-
1. clone `homebrew-ethereum` project that provides homebrew formulae for `solc`:
|
|
96
|
-
|
|
97
|
-
```sh
|
|
98
|
-
git clone git@github.com:ethereum/homebrew-ethereum.git
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
2. change to project directory
|
|
102
|
-
|
|
103
|
-
```sh
|
|
104
|
-
cd homebrew-ethereum
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
3. checkout the commit hash for version 0.5.16
|
|
108
|
-
|
|
109
|
-
```sh
|
|
110
|
-
git checkout 5df4d76a780813a0ad625619572afb358d46c1d4
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
4. Install compiler version 0.5.16 by executing command
|
|
114
|
-
|
|
115
|
-
```sh
|
|
116
|
-
brew install solidity@5
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
5. Verify the installed solidity version
|
|
120
|
-
|
|
121
|
-
```sh
|
|
122
|
-
solc --version
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
- the command should print the console log:
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
solc, the solidity compiler commandline interface
|
|
129
|
-
Version: 0.5.16+commit.9c3226ce.Darwin.appleclang
|
|
130
|
-
```
|
|
131
|
-
|
|
132
70
|
## Testing
|
|
133
71
|
|
|
134
72
|
Jest contract tests are defined under the [tests directory](https://github.com/VenusProtocol/venus-protocol/tree/master/tests). To run the tests run:
|
|
135
73
|
|
|
136
74
|
yarn test
|
|
137
75
|
|
|
138
|
-
## Integration Specs
|
|
139
|
-
|
|
140
|
-
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.
|
|
141
|
-
|
|
142
|
-
## Formal Verification Specs
|
|
143
|
-
|
|
144
|
-
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.
|
|
145
|
-
|
|
146
76
|
## Testing
|
|
147
77
|
|
|
148
78
|
Contract tests are defined under the [tests directory](https://github.com/VenusProtocol/venus-protocol/tree/master/tests). To run the tests run:
|
|
@@ -233,4 +163,4 @@ For any concerns with the protocol, open an issue or visit us on [Telegram](http
|
|
|
233
163
|
|
|
234
164
|
For security concerns, please contact the administrators of our telegram chat.
|
|
235
165
|
|
|
236
|
-
© Copyright
|
|
166
|
+
© Copyright 2023, Venus Protocol
|