Skip to content

Commit

Permalink
fix: moving PERCENTAGE_FACTOR to contants
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmikko committed May 28, 2023
1 parent 7198e27 commit b1c1cb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions contracts/libraries/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pragma solidity ^0.8.10;

uint256 constant WAD = 1e18;
uint256 constant RAY = 1e27;
uint16 constant PERCENTAGE_FACTOR = 1e4; //percentage plus two decimals

// 25% of type(uint256).max
uint256 constant ALLOWANCE_THRESHOLD = type(uint96).max >> 3;
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/PercentageMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity ^0.8.10;

import { Errors } from "./Errors.sol";
import { PERCENTAGE_FACTOR } from "./Constants.sol";

uint16 constant PERCENTAGE_FACTOR = 1e4; //percentage plus two decimals
uint256 constant HALF_PERCENT = PERCENTAGE_FACTOR / 2;

/**
Expand Down

0 comments on commit b1c1cb6

Please sign in to comment.