Skip to content

Commit

Permalink
ratio -> rate
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendanSanderson committed Feb 24, 2024
1 parent 3a6ed09 commit 8b439ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/pumps/MultiFlowPump.sol
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ contract MultiFlowPump is IPump, IMultiFlowPumpErrors, IInstantaneousPump, ICumu
cappedReserves = _capLpTokenSupply(lastReserves, cappedReserves, capExponent, crp, mfpWf, wf.data, true);

if (cappedReserves.length == 0) {
cappedReserves = _capRatios(lastReserves, reserves, capExponent, crp, mfpWf, wf.data);
cappedReserves = _capRates(lastReserves, reserves, capExponent, crp, mfpWf, wf.data);

cappedReserves = _capLpTokenSupply(lastReserves, cappedReserves, capExponent, crp, mfpWf, wf.data, false);
} else {
cappedReserves = _capRatios(lastReserves, cappedReserves, capExponent, crp, mfpWf, wf.data);
cappedReserves = _capRates(lastReserves, cappedReserves, capExponent, crp, mfpWf, wf.data);
}
}

Expand All @@ -252,7 +252,7 @@ contract MultiFlowPump is IPump, IMultiFlowPumpErrors, IInstantaneousPump, ICumu
/**
* @dev Cap the change in ratio of `reserves` to a maximum % change from `lastReserves`.
*/
function _capRatios(
function _capRates(
uint256[] memory lastReserves,
uint256[] memory reserves,
uint256 capExponent,
Expand Down
2 changes: 1 addition & 1 deletion test/pumps/PumpHelpers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function encodePumpData(
data = abi.encode(alpha, capInterval, crp);
}

function mockPumpData() view returns (bytes memory data) {
function mockPumpData() pure returns (bytes memory data) {
bytes16[][] memory maxRatioChanges = new bytes16[][](2);
maxRatioChanges[0] = new bytes16[](2);
maxRatioChanges[1] = new bytes16[](2);
Expand Down

0 comments on commit 8b439ef

Please sign in to comment.