Commit b9c9f1f 1 parent 3b783d3 commit b9c9f1f Copy full SHA for b9c9f1f
File tree 2 files changed +18
-8
lines changed
2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -85,5 +85,11 @@ contract SolaxyInvarantTest is Test {
85
85
SLX.balanceOf (handlerAddress) + SLX.balanceOf (tipAccount ()),
86
86
"Total handler holdings plus all fees collected should be strictly equal to the total token supply "
87
87
);
88
+
89
+ assertEq (
90
+ SLX.totalAssets (),
91
+ SLX.previewRedeem (SLX.totalSupply ()),
92
+ "Total reserve assets must be enough to cover the conversion of all existing tokens to less than a cent rounding error "
93
+ );
88
94
}
89
95
}
Original file line number Diff line number Diff line change @@ -106,10 +106,12 @@ contract SolaxyUnitTest is Test {
106
106
totalAssetsAfterDeposit - reserve_amountWithdrawn,
107
107
"reserve balance should increase after withdrawal "
108
108
);
109
-
110
- // Check for fees
111
- // uint256 SLX_feeBalance = SLX.balanceOf(tipAccount());
112
- // assertEq(SLX_feeBalance, 17950000000000000000);
109
+ assertApproxEqAbs (
110
+ SLX.balanceOf (tipAccount ()),
111
+ SLX_amountIn - SLX_amountBurned,
112
+ 0.000000002e18 ,
113
+ "tip should be difference between all shares burnt vs shares spent "
114
+ );
113
115
}
114
116
115
117
function test_M3terHolderCanMintAndRedeem () public {
@@ -153,9 +155,11 @@ contract SolaxyUnitTest is Test {
153
155
0.00002e18 ,
154
156
"reserve balance should increase after redeeming "
155
157
);
156
-
157
- // Check for fees
158
- // uint256 SLX_feeBalance = SLX.balanceOf(tipAccount());
159
- // assertEq(SLX_feeBalance, 17938800000000000000);
158
+ assertApproxEqAbs (
159
+ SLX.balanceOf (tipAccount ()),
160
+ SLX_amountIn - SLX_amountBurned,
161
+ 0.000000002e18 ,
162
+ "tip should be difference between all shares burnt vs shares spent "
163
+ );
160
164
}
161
165
}
You can’t perform that action at this time.
0 commit comments