Skip to content

Commit

Permalink
SupplyController: discount the treasury funds from the burn max
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivshti committed Jul 27, 2023
1 parent 29e9215 commit 7cc20ce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contracts/SupplyController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ contract ADXSupplyController {
uint public constant CAP = 150000000 * 1e18;
// This amount was burned on purpose when migrating from Tom pool 2 (Staking with token 0xade) to Tom pool 3 (StakingPool with token 0xade) - 35m
// another 10m burned from treasury and 2 we count as burned from the flash pool
// add another 2M + 2M that the company burned
uint public immutable BURNED_MIN = 49000000 * 1e18;
uint public immutable BURNED_MIN = 45000000 * 1e18;
IADXToken public immutable ADX;

mapping (address => uint8) public governance;
Expand Down Expand Up @@ -45,7 +44,7 @@ contract ADXSupplyController {

function innerMint(IADXToken token, address owner, uint amount) internal {
uint totalSupplyAfter = token.totalSupply() + amount;
require(totalSupplyAfter <= CAP + BURNED_MIN, "MINT_TOO_LARGE");
require(totalSupplyAfter <= CAP + BURNED_MIN + token.balanceOf("0x23c2c34f38ce66ccc10e71e9bb2a06532d52c5e9"), "MINT_TOO_LARGE");
token.mint(owner, amount);
}

Expand Down

0 comments on commit 7cc20ce

Please sign in to comment.