Skip to content

Commit

Permalink
feat: more strict redemptionDelayBlocks (#905)
Browse files Browse the repository at this point in the history
  • Loading branch information
gitcoindev authored Feb 26, 2024
1 parent 38c3656 commit 06f2fdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions packages/contracts/src/dollar/libraries/LibUbiquityPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ library LibUbiquityPool {
poolStorage.lastRedeemedBlock[msg.sender].add(
poolStorage.redemptionDelayBlocks
)
) <= block.number,
) < block.number,
"Too soon to collect redemption"
);

Expand Down Expand Up @@ -533,10 +533,9 @@ library LibUbiquityPool {
// roundId
int256 answer, // startedAt
,
uint256 updatedAt,
uint256 updatedAt, // answeredInRound

) = // answeredInRound
priceFeed.latestRoundData();
) = priceFeed.latestRoundData();

// fetch number of decimals in chainlink feed
uint256 priceFeedDecimals = priceFeed.decimals();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ contract UbiquityPoolFacetTest is DiamondTestSetup {
);

// wait 3 blocks for collecting redemption to become active
vm.roll(3);
vm.roll(block.number + 3);

// balances before
assertEq(collateralToken.balanceOf(address(ubiquityPoolFacet)), 100e18);
Expand Down

0 comments on commit 06f2fdf

Please sign in to comment.