Skip to content

Commit 3296e35

Browse files
committed
reverted rename
1 parent 3464e98 commit 3296e35

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

contracts/UFragmentsPolicy.sol

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ contract UFragmentsPolicy is Ownable {
4040

4141
event Rebase(
4242
uint256 indexed epoch,
43-
uint256 currentRate,
43+
uint256 exchangeRate,
4444
uint256 targetRate,
4545
int256 requestedSupplyAdjustment,
4646
uint256 timestampSec
@@ -133,24 +133,24 @@ contract UFragmentsPolicy is Ownable {
133133
(targetRate, targetRateValid) = cpiOracle.getData();
134134
require(targetRateValid);
135135

136-
uint256 currentRate;
137-
bool currentRateValid;
138-
(currentRate, currentRateValid) = marketOracle.getData();
139-
require(currentRateValid);
136+
uint256 exchangeRate;
137+
bool rateValid;
138+
(exchangeRate, rateValid) = marketOracle.getData();
139+
require(rateValid);
140140

141-
if (currentRate > MAX_RATE) {
142-
currentRate = MAX_RATE;
141+
if (exchangeRate > MAX_RATE) {
142+
exchangeRate = MAX_RATE;
143143
}
144144

145-
int256 supplyDelta = computeSupplyDelta(currentRate, targetRate);
145+
int256 supplyDelta = computeSupplyDelta(exchangeRate, targetRate);
146146

147147
if (supplyDelta > 0 && uFrags.totalSupply().add(uint256(supplyDelta)) > MAX_SUPPLY) {
148148
supplyDelta = (MAX_SUPPLY.sub(uFrags.totalSupply())).toInt256Safe();
149149
}
150150

151151
uint256 supplyAfterRebase = uFrags.rebase(epoch, supplyDelta);
152152
assert(supplyAfterRebase <= MAX_SUPPLY);
153-
emit Rebase(epoch, currentRate, targetRate, supplyDelta, block.timestamp);
153+
emit Rebase(epoch, exchangeRate, targetRate, supplyDelta, block.timestamp);
154154
}
155155

156156
/**

0 commit comments

Comments
 (0)