Skip to content
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: 1 addition & 1 deletion contracts/contracts/vault/VaultAdmin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ contract VaultAdmin is VaultStorage {
*/
function setDripDuration(uint64 _durationSeconds) external onlyGovernor {
dripper.dripDuration = _durationSeconds;
emit DriperDurationChanged(_durationSeconds);
emit DripperDurationChanged(_durationSeconds);
}

/**
Expand Down
14 changes: 7 additions & 7 deletions contracts/contracts/vault/VaultCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ contract VaultCore is VaultStorage {
using StableMath for uint256;
using SafeMath for uint256;
// max signed int
uint256 constant MAX_INT = 2**255 - 1;
uint256 internal constant MAX_INT = 2**255 - 1;
// max un-signed int
uint256 constant MAX_UINT =
uint256 internal constant MAX_UINT =
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
// impl contract address
address immutable SELF = address(this);
address internal immutable SELF = address(this);

/**
* @dev Verifies that the rebasing is not paused.
Expand Down Expand Up @@ -387,7 +387,7 @@ contract VaultCore is VaultStorage {
* @dev Update the supply of ousd
*
* 1. Calculate new gains, splitting gains between the dripper and protocol reserve
* 2. Drip out from the driper and update the dripper storage
* 2. Drip out from the dripper and update the dripper storage
* 3. Distribute yield, splitting between trustee fees and rebasing
* the remaining post dripper funds to users
*
Expand Down Expand Up @@ -460,7 +460,7 @@ contract VaultCore is VaultStorage {
}

// Rebase remaining to users
// Invarient: must only increase OUSD supply.
// Invariant: must only increase OUSD supply.
// Can only increase because:
// ousdSupply + yield >= ousdSupply and yield > fee
oUSD.changeSupply(ousdSupply + yield);
Expand Down Expand Up @@ -502,7 +502,7 @@ contract VaultCore is VaultStorage {

/**
* @dev Internal to calculate total value of all assets held in Vault.
* @return value Total value in ETH (1e18)
* @return value Total value in USD (1e18)
*/
function _totalValueInVault() internal view returns (uint256 value) {
for (uint256 y = 0; y < allAssets.length; y++) {
Expand All @@ -517,7 +517,7 @@ contract VaultCore is VaultStorage {

/**
* @dev Internal to calculate total value of all assets held in Strategies.
* @return value Total value in ETH (1e18)
* @return value Total value in USD (1e18)
*/
function _totalValueInStrategies() internal view returns (uint256 value) {
for (uint256 i = 0; i < allStrategies.length; i++) {
Expand Down
4 changes: 2 additions & 2 deletions contracts/contracts/vault/VaultStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ contract VaultStorage is Initializable, Governable {
event YieldReceived(uint256 _yield);
event YieldDistribution(address _to, uint256 _yield, uint256 _fee);
event ProtocolReserveBpsChanged(uint256 _basis);
event DriperDurationChanged(uint256 _seconds);
event DripperDurationChanged(uint256 _seconds);
event TrusteeFeeBpsChanged(uint256 _basis);
event TrusteeAddressChanged(address _address);
event NetOusdMintForStrategyThresholdChanged(uint256 _threshold);
Expand Down Expand Up @@ -112,7 +112,7 @@ contract VaultStorage is Initializable, Governable {
// Deprecated: Tokens that should be swapped for stablecoins
address[] private _deprecated_swapTokens;

uint256 constant MINT_MINIMUM_ORACLE = 99800000;
uint256 internal constant MINT_MINIMUM_ORACLE = 99800000;

// Meta strategy that is allowed to mint/burn OUSD without changing collateral
address public ousdMetaStrategy = address(0);
Expand Down