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

chore: update comments #237

Merged
merged 5 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
8 changes: 0 additions & 8 deletions contracts/interfaces/IBreakerBox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ interface IBreakerBox {
*
* - Enabled: Indicates whether the breaker is enabled for the associated rate feed.
*/

/**
* @dev Used to keep track of the status of a breaker for a specific rate feed.
*
* tradingMode: Represents the trading mode that the breaker is in for the rate feed.
* This is a bitmask, and multiple breakers contribute
* to the final trading mode of the rate feed.
*/
struct BreakerStatus {
uint8 tradingMode;
uint64 lastUpdatedTime;
Expand Down
2 changes: 1 addition & 1 deletion contracts/oracles/BreakerBox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Initializable } from "../common/Initializable.sol";
* to determine whether or not buying or selling should be allowed for a
* specified rateFeedIDs. The contract stores references to all breakers
* that hold criteria to be checked, rateFeedIDs that
* can make use of the BreakerBox & their current trading.
* can make use of the BreakerBox & their current trading modes.
*/
contract BreakerBox is IBreakerBox, Ownable {
using SafeMath for uint256;
Expand Down
2 changes: 1 addition & 1 deletion contracts/oracles/breakers/MedianDeltaBreaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ contract MedianDeltaBreaker is IBreaker, WithCooldown, WithThreshold, Ownable {
/**
* @notice Check if the current median report rate for a rate feed change, relative
* to the last median report, is greater than the configured threshold.
* If the change is greater than the threshold the breaker will trip.
* If the change is greater than the threshold the breaker will be triggered.
* @param rateFeedID The rate feed to be checked.
* @return triggerBreaker A bool indicating whether or not this breaker
* should be tripped for the rate feed.
Expand Down
2 changes: 1 addition & 1 deletion contracts/oracles/breakers/ValueDeltaBreaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ contract ValueDeltaBreaker is IBreaker, WithCooldown, WithThreshold, Ownable {
/**
* @notice Check if the current median report rate change, for a rate feed, relative
* to the last median report is greater than a calculated threshold.
* If the change is greater than the threshold the breaker will trip.
* If the change is greater than the threshold the breaker will be triggered.
* @param rateFeedID The rate feed to be checked.
* @return triggerBreaker A bool indicating whether or not this breaker
* should be tripped for the rate feed.
Expand Down
2 changes: 1 addition & 1 deletion test/integration/ConstantSumIntegration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ contract ConstantSumIntegrationTest is IntegrationTest, TokenHelpers {
assertEq(actualOut, 5000 * 0.995 * 10**6); // 4975(6 decimals)

vm.warp(now + exchangeBefore.config.referenceRateResetFrequency); // time travel enable bucket update
setMedianRate(cUSD_bridgedUSDC_referenceRateFeedID, 1e24 * 1.1); // new valid Median that doesnt trip breaker 0.13
setMedianRate(cUSD_bridgedUSDC_referenceRateFeedID, 1e24 * 1.1); // new valid Median that wont trigger breaker 0.13

// Execute swap cUSD -> USDC
(, uint256 actualOut2) = doSwapIn(poolId, amountIn, address(tokenIn), address(tokenOut), false);
Expand Down
Loading