@@ -207,7 +207,6 @@ describe('Matic Integration Test', () => {
207207 const protocolFees = percOf2 ( increase , protocolFeesPercent )
208208 const newStake = deposit . add ( initialStake ) . add ( increase )
209209 const newStakeMinusFees = newStake . sub ( liquidityFees . add ( protocolFees ) )
210- const percDiv = ethers . utils . parseEther ( '1' )
211210 let totalShares : BigNumber
212211
213212 describe ( 'stake increased' , ( ) => {
@@ -237,15 +236,12 @@ describe('Matic Integration Test', () => {
237236 expect ( await TenderToken . balanceOf ( BPool . address ) ) . to . eq ( sharesToTokens ( shares , totalShares , await TenderToken . totalSupply ( ) ) )
238237 } )
239238
240- it ( 'changes the weights of the AMM' , async ( ) => {
241- const tBal = await TenderToken . balanceOf ( BPool . address )
242- const bal = await MaticToken . balanceOf ( BPool . address )
243-
244- const acceptableDelta = ethers . BigNumber . from ( '100' )
239+ it ( 'steak balance stays the same' , async ( ) => {
240+ expect ( await MaticToken . balanceOf ( BPool . address ) ) . to . eq ( initialStake )
241+ } )
245242
246- const expected = tBal . mul ( percDiv ) . div ( tBal . add ( bal ) )
247- const actual = await BPool . getNormalizedWeight ( TenderToken . address )
248- expect ( actual . sub ( expected ) . abs ( ) ) . to . be . lte ( acceptableDelta )
243+ it ( 'weights of the AMM stay 50-50' , async ( ) => {
244+ expect ( await BPool . getNormalizedWeight ( TenderToken . address ) ) . to . be . eq ( ethers . utils . parseEther ( '1' ) . div ( 2 ) )
249245 } )
250246
251247 it ( 'should emit RewardsClaimed event from Tenderizer' , async ( ) => {
@@ -256,7 +252,6 @@ describe('Matic Integration Test', () => {
256252 describe ( 'stake decrease' , ( ) => {
257253 // The decrease will offset the increase from the previous test
258254 const newStake = deposit . add ( initialStake )
259- const percDiv = ethers . utils . parseEther ( '1' )
260255 let totalShares : BigNumber
261256 let oldPrinciple : BigNumber
262257
@@ -291,12 +286,12 @@ describe('Matic Integration Test', () => {
291286 expect ( await TenderToken . balanceOf ( BPool . address ) ) . to . eq ( sharesToTokens ( shares , totalShares , await TenderToken . totalSupply ( ) ) )
292287 } )
293288
294- it ( 'changes the weights of the AMM' , async ( ) => {
295- const acceptableDelta = ethers . BigNumber . from ( '10' )
289+ it ( 'steak balance stays the same' , async ( ) => {
290+ expect ( await MaticToken . balanceOf ( BPool . address ) ) . to . eq ( initialStake )
291+ } )
296292
297- const expected = percDiv . div ( 2 )
298- const actual = await BPool . getNormalizedWeight ( TenderToken . address )
299- expect ( actual . sub ( expected ) . abs ( ) ) . to . be . lte ( acceptableDelta )
293+ it ( 'weights of the AMM stay 50-50' , async ( ) => {
294+ expect ( await BPool . getNormalizedWeight ( TenderToken . address ) ) . to . be . eq ( ethers . utils . parseEther ( '1' ) . div ( 2 ) )
300295 } )
301296
302297 it ( 'should emit RewardsClaimed event from Tenderizer with 0 rewards and currentPrinciple' , async ( ) => {
0 commit comments