diff --git a/src/PSMFed.sol b/src/PSMFed.sol index 5e17ed6..ee3b769 100644 --- a/src/PSMFed.sol +++ b/src/PSMFed.sol @@ -22,6 +22,8 @@ contract PSMFed { event PendingGovUpdated(address indexed pendingGov); event ChairChanged(address indexed oldChair, address indexed newChair); event SupplyCapUpdated(uint256 oldSupplyCap, uint256 newSupplyCap); + event Expansion(uint256 amount); + event Contraction(uint256 amount); constructor(address _psm, address _gov, address _chair, address _dola) { psm = _psm; @@ -52,6 +54,7 @@ contract PSMFed { require(amount + supply <= supplyCap, "Supply cap exceeded"); supply += amount; DOLA.mint(psm, amount); + emit Expansion(amount); } /** @@ -66,6 +69,7 @@ contract PSMFed { supply -= amount; DOLA.transferFrom(psm, address(this), amount); DOLA.burn(amount); + emit Contraction(amount); } /** diff --git a/test/PSM.t.sol b/test/PSM.t.sol index d67da9c..5cc15ea 100644 --- a/test/PSM.t.sol +++ b/test/PSM.t.sol @@ -441,7 +441,7 @@ contract PSMTest is Test { uint256 sellFee1 = dolaToSell1 * psm.sellFeeBps() / 10000; // 1% sell fee uint256 sellFee2 = dolaToSell2 * psm.sellFeeBps() / 10000; // 1% sell fee assertEq(collateral.balanceOf(user), user1CollateralBal - (buyFee1 + sellFee1)); // User 1 gets back collateral minus fees - // Profit should include fees from both users + // Profit should include fees from both users assertEq(psm.getProfit(), psmProfit + buyFee1 + buyFee2 + sellFee1 + sellFee2); psm.takeProfit(); // Take profit