Skip to content

Commit

Permalink
minting changes certora spec
Browse files Browse the repository at this point in the history
  • Loading branch information
aazhou1 committed Jun 25, 2024
1 parent 7950d57 commit 726543b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions certora/specs/termRepoServicer/minting.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ using TermRepoToken as mintingRepoToken;
using DummyERC20A as mintingToken;

methods {
function SPECIALIST_ROLE() external returns (bytes32) envfree;
function collateralBalance(address,uint256) external returns (uint256) envfree;
function endOfRepurchaseWindow() external returns (uint256) envfree;
function getBorrowerRepurchaseObligation(address) external returns (uint256) envfree;
Expand Down Expand Up @@ -46,6 +45,8 @@ methods {
function DummyERC20A.allowance(address,address) external returns(uint256) envfree;
function DummyERC20A.balanceOf(address) external returns(uint256) envfree;
function DummyERC20A.totalSupply() external returns(uint256) envfree;

TermController.verifyMintExposureAccess(address) external returns (bool) envfree;
}


Expand Down Expand Up @@ -188,7 +189,7 @@ rule mintOpenExposureRevertConditions(env e) {
require(mintingCollateralManager.encumberedCollateralBalance(mintingToken) + collateralAmounts[0] <= max_uint256 );
require(mintingCollateralManager.getCollateralBalance(e.msg.sender, mintingToken) + collateralAmounts[0] <= max_uint256);
bool payable = e.msg.value > 0;
bool callerNotSpecialist = !hasRole(SPECIALIST_ROLE(), e.msg.sender);
bool callerNotSpecialist = !mintingController.verifyMintExposureAccess(e.msg.sender);
bool noMinterRole = !mintingRepoToken.hasRole(mintingRepoToken.MINTER_ROLE(), currentContract);
bool noServicerRoleToCollatManager = !mintingCollateralManager.hasRole(mintingCollateralManager.SERVICER_ROLE(), currentContract);
bool borrowerNotEnoughCollateralBalance = mintingToken.balanceOf(e.msg.sender) < collateralAmounts[0];
Expand Down
1 change: 0 additions & 1 deletion contracts/TermRepoServicer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ contract TermRepoServicer is
bytes32 public constant COLLATERAL_MANAGER =
keccak256("COLLATERAL_MANAGER");
bytes32 public constant DEVOPS_ROLE = keccak256("DEVOPS_ROLE");
bytes32 public constant SPECIALIST_ROLE = keccak256("SPECIALIST_ROLE");
bytes32 public constant ROLLOVER_MANAGER = keccak256("ROLLOVER_MANAGER");
bytes32 public constant ROLLOVER_TARGET_AUCTIONEER_ROLE =
keccak256("ROLLOVER_TARGET_AUCTIONEER_ROLE");
Expand Down

0 comments on commit 726543b

Please sign in to comment.