@@ -2,7 +2,6 @@ import { ethers, upgrades, waffle } from 'hardhat'
22import { Contract , Signer , BigNumber , BigNumberish , Event } from 'ethers'
33import { TransactionResponse } from '@ethersproject/providers'
44import { expect } from 'chai'
5- import { Result } from 'ethers/lib/utils'
65import { imul , increaseTime } from '../utils/utils'
76
87let uFragmentsPolicy : Contract ,
@@ -20,8 +19,8 @@ const INITIAL_TARGET_RATE_25P_LESS = imul(INITIAL_TARGET_RATE, '0.75', 1)
2019const INITIAL_RATE = ethers . utils . parseUnits ( '1.05' , 18 )
2120const INITIAL_RATE_30P_MORE = imul ( INITIAL_RATE , '1.3' , 1 )
2221const INITIAL_RATE_30P_LESS = imul ( INITIAL_RATE , '0.7' , 1 )
23- const INITIAL_RATE_2P_MORE = imul ( INITIAL_RATE , '1.02 ' , 1 )
24- const INITIAL_RATE_2P_LESS = imul ( INITIAL_RATE , '0.98 ' , 1 )
22+ const INITIAL_RATE_2_5_P_MORE = imul ( INITIAL_RATE , '1.025 ' , 1 )
23+ const INITIAL_RATE_2_5_P_LESS = imul ( INITIAL_RATE , '0.975 ' , 1 )
2524const INITIAL_RATE_60P_MORE = imul ( INITIAL_RATE , '1.6' , 1 )
2625const INITIAL_RATE_50P_LESS = imul ( INITIAL_RATE , '0.5' , 1 )
2726const INITIAL_RATE_2X = INITIAL_RATE . mul ( 2 )
@@ -149,7 +148,7 @@ describe('UFragmentsPolicy:initialize', async function () {
149148
150149 it ( 'deviationThreshold' , async function ( ) {
151150 expect ( await uFragmentsPolicy . deviationThreshold ( ) ) . to . eq (
152- ethers . utils . parseUnits ( '5 ' , 16 ) ,
151+ ethers . utils . parseUnits ( '25 ' , 15 ) ,
153152 )
154153 } )
155154 it ( 'rebaseLag' , async function ( ) {
@@ -399,8 +398,8 @@ describe('UFragmentsPolicy:CurveParameters', async function () {
399398
400399 describe ( 'when rebaseFunctionGrowth is more than 0' , async function ( ) {
401400 it ( 'should setRebaseFunctionGrowth' , async function ( ) {
402- await uFragmentsPolicy . connect ( deployer ) . setRebaseFunctionGrowth ( 1000 )
403- expect ( await uFragmentsPolicy . rebaseFunctionGrowth ( ) ) . to . eq ( 1000 )
401+ await uFragmentsPolicy . connect ( deployer ) . setRebaseFunctionGrowth ( '42000000000000000000' )
402+ expect ( await uFragmentsPolicy . rebaseFunctionGrowth ( ) ) . to . eq ( '42000000000000000000' )
404403 } )
405404 } )
406405
@@ -702,7 +701,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
702701 await increaseTime ( 60 )
703702
704703 await mockExternalData (
705- INITIAL_RATE_2P_MORE . sub ( 2 ) ,
704+ INITIAL_RATE_2_5_P_MORE . sub ( 2 ) ,
706705 INITIAL_TARGET_RATE ,
707706 1000 ,
708707 )
@@ -716,7 +715,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
716715 await increaseTime ( 60 )
717716
718717 await mockExternalData (
719- INITIAL_RATE_2P_LESS . add ( 2 ) ,
718+ INITIAL_RATE_2_5_P_LESS . add ( 2 ) ,
720719 INITIAL_TARGET_RATE ,
721720 1000 ,
722721 )
@@ -991,7 +990,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
991990 prevEpoch . add ( 1 ) ,
992991 INITIAL_RATE_60P_MORE ,
993992 INITIAL_TARGET_RATE ,
994- 55 ,
993+ 50 ,
995994 )
996995 } )
997996
@@ -1014,7 +1013,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
10141013 . withArgs ( 'UFragments' , 'rebase' , uFragmentsPolicy . address )
10151014 await expect ( r )
10161015 . to . emit ( mockUFragments , 'FunctionArguments' )
1017- . withArgs ( [ prevEpoch . add ( 1 ) ] , [ 55 ] )
1016+ . withArgs ( [ prevEpoch . add ( 1 ) ] , [ 50 ] )
10181017 } )
10191018 } )
10201019} )
@@ -1045,7 +1044,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
10451044 uFragmentsPolicy . connect ( orchestrator ) . rebase ( ) ,
10461045 )
10471046 ) . requestedSupplyAdjustment ,
1048- ) . to . eq ( - 29 )
1047+ ) . to . eq ( - 76 )
10491048 } )
10501049 } )
10511050
@@ -1065,7 +1064,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
10651064 uFragmentsPolicy . connect ( orchestrator ) . rebase ( ) ,
10661065 )
10671066 ) . requestedSupplyAdjustment ,
1068- ) . to . eq ( 100 )
1067+ ) . to . eq ( 50 )
10691068 } )
10701069 } )
10711070
@@ -1085,7 +1084,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
10851084 uFragmentsPolicy . connect ( orchestrator ) . rebase ( ) ,
10861085 )
10871086 ) . requestedSupplyAdjustment ,
1088- ) . to . eq ( - 100 )
1087+ ) . to . eq ( - 77 )
10891088 } )
10901089 } )
10911090
@@ -1105,7 +1104,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
11051104 uFragmentsPolicy . connect ( orchestrator ) . rebase ( ) ,
11061105 )
11071106 ) . requestedSupplyAdjustment ,
1108- ) . to . eq ( - 100 )
1107+ ) . to . eq ( - 77 )
11091108 } )
11101109 } )
11111110} )
@@ -1137,7 +1136,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
11371136 uFragmentsPolicy . connect ( orchestrator ) . rebase ( ) ,
11381137 )
11391138 ) . requestedSupplyAdjustment ,
1140- ) . to . eq ( - 20 )
1139+ ) . to . eq ( - 76 )
11411140 } )
11421141 } )
11431142} )
@@ -1169,7 +1168,7 @@ describe('UFragmentsPolicy:Rebase', async function () {
11691168 uFragmentsPolicy . connect ( orchestrator ) . rebase ( ) ,
11701169 )
11711170 ) . requestedSupplyAdjustment ,
1172- ) . to . eq ( 32 )
1171+ ) . to . eq ( 49 )
11731172 } )
11741173 } )
11751174} )
0 commit comments