Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sporejack committed Oct 18, 2021
1 parent 4b8eb1e commit 0b7e113
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contracts/implementation/PoolKeeper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ contract PoolKeeper is IPoolKeeper, Ownable {
uint256 public constant TIP_DELTA_PER_BLOCK = 5; // 5% increase per block
uint256 public constant BLOCK_TIME = 13; /* in seconds */
uint256 public constant MAX_DECIMALS = 18;
uint256 public constant MAX_TIP = 100; /* maximum keeper tip */

// #### Global variables
/**
Expand Down Expand Up @@ -226,8 +227,8 @@ contract PoolKeeper is IPoolKeeper, Ownable {
uint256 keeperTip = BASE_TIP + (TIP_DELTA_PER_BLOCK * elapsedBlocksNumerator) / BLOCK_TIME;

// In case of network outages or otherwise, we want to cap the tip so that the keeper cost isn't unbounded
if (keeperTip > 100) {
return 100;
if (keeperTip > MAX_TIP) {
return MAX_TIP;
} else {
return keeperTip;
}
Expand Down

0 comments on commit 0b7e113

Please sign in to comment.