Skip to content

Commit

Permalink
update default rate limit params for USDC (#1056)
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyding committed Feb 7, 2024
1 parent d31fa07 commit d3273b1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions protocol/app/testdata/default_genesis_state.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,12 @@
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
"limiters": [
{
"baseline_minimum": "100000000000",
"baseline_minimum": "1000000000000",
"baseline_tvl_ppm": 10000,
"period": "3600s"
},
{
"baseline_minimum": "1000000000000",
"baseline_minimum": "10000000000000",
"baseline_tvl_ppm": 100000,
"period": "86400s"
}
Expand Down
6 changes: 3 additions & 3 deletions protocol/scripts/genesis/sample_pregenesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -1694,12 +1694,12 @@
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
"limiters": [
{
"baseline_minimum": "100000000000",
"baseline_minimum": "1000000000000",
"baseline_tvl_ppm": 10000,
"period": "3600s"
},
{
"baseline_minimum": "1000000000000",
"baseline_minimum": "10000000000000",
"baseline_tvl_ppm": 100000,
"period": "86400s"
}
Expand Down Expand Up @@ -1782,7 +1782,7 @@
]
}
},
"app_version": "3.0.0-dev0-60-ge0fd2767",
"app_version": "4.0.0-dev0-22-gd31fa077",
"chain_id": "dydx-sample-1",
"consensus": {
"params": {
Expand Down
4 changes: 2 additions & 2 deletions protocol/testutil/constants/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -1366,12 +1366,12 @@ const GenesisState = `{
"denom": "ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5",
"limiters": [
{
"baseline_minimum": "100000000000",
"baseline_minimum": "1000000000000",
"baseline_tvl_ppm": 10000,
"period": "3600s"
},
{
"baseline_minimum": "1000000000000",
"baseline_minimum": "10000000000000",
"baseline_tvl_ppm": 100000,
"period": "86400s"
}
Expand Down
4 changes: 2 additions & 2 deletions protocol/x/ratelimit/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import (

// BigBaselineMinimum1Hr defines the minimum baseline USDC for the 1-hour rate-limit.
var BigBaselineMinimum1Hr = new(big.Int).Mul(
big.NewInt(100_000), // 100k full coins
big.NewInt(1_000_000), // 1m full coins
lib.BigPow10(-assettypes.UusdcDenomExponent),
)

// BigBaselineMinimum1Day defines the minimum baseline USDC for the 1-day rate-limit.
var BigBaselineMinimum1Day = new(big.Int).Mul(
big.NewInt(1_000_000), // 1m full coins
big.NewInt(10_000_000), // 10m full coins
lib.BigPow10(-assettypes.UusdcDenomExponent),
)

Expand Down
4 changes: 2 additions & 2 deletions protocol/x/ratelimit/types/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ func TestDefaultUsdcRateLimitParams(t *testing.T) {
Limiters: []types.Limiter{
{
Period: 3600 * time.Second,
BaselineMinimum: dtypes.NewInt(100_000_000_000),
BaselineMinimum: dtypes.NewInt(1_000_000_000_000),
BaselineTvlPpm: 10_000,
},
{
Period: 24 * time.Hour,
BaselineMinimum: dtypes.NewInt(1_000_000_000_000),
BaselineMinimum: dtypes.NewInt(10_000_000_000_000),
BaselineTvlPpm: 100_000,
},
},
Expand Down

0 comments on commit d3273b1

Please sign in to comment.