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

Fix [Certora][L-02] Redundant code block #159

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 0 additions & 5 deletions src/StakingManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,6 @@ contract StakingManager is
// Call function in auction contract to re-initiate the bid that won
auctionManager.reEnterAuction(_validatorId);

bool isFullStake = (msg.sender != liquidityPoolContract);
if (isFullStake) {
_refundDeposit(msg.sender, stakeAmount);
}

emit DepositCancelled(_validatorId);
}

Expand Down
24 changes: 24 additions & 0 deletions src/eBtcRateProvider.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

interface IRateProvider {
function getRate() external view returns (uint256);
function getRateSafe() external view returns (uint256 rate);
function decimals() external view returns (uint8);
}

contract eBtcRateProvider is IRateProvider {
IRateProvider public rateProvier = IRateProvider(0x1b293DC39F94157fA0D1D36d7e0090C8B8B8c13F);

function getRate() external view returns (uint256) {
return rateProvier.getRate() * 1e10;
}

function getRateSafe() external view returns (uint256 rate) {
return rateProvier.getRateSafe() * 1e10;
}

function decimals() external view returns (uint8) {
return rateProvier.decimals() + 10;
}
}
Loading