Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update default values for clp params #3436

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integrationtest/output/tc1.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"liquidity_provider_units": "1000000000000000000000",
"liquidity_provider_address": "sif1syavy2npfyt9tcncdtsdzf7kny9lh777yqc2nd",
"last_updated_block": 1,
"last_updated_block": 4,
"reward_amount": null
}
}
Expand Down
2 changes: 2 additions & 0 deletions x/clp/keeper/executors.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ func (k Keeper) RemoveLiquidity(ctx sdk.Context, pool types.Pool, externalAssetC
k.DestroyLiquidityProvider(ctx, lp.Asset.Symbol, lp.LiquidityProviderAddress)
} else {
lp.LiquidityProviderUnits = lpUnitsLeft
// Set LP’s LastUpdatedBlock to current block height
lp.LastUpdatedBlock = ctx.BlockHeight()
k.SetLiquidityProvider(ctx, &lp)
}
return nil
Expand Down
4 changes: 2 additions & 2 deletions x/clp/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ func GetLiquidityProviderKey(externalTicker string, lp string) []byte {

func GetDefaultRewardParams() *RewardParams {
return &RewardParams{
LiquidityRemovalLockPeriod: 12 * 60 * 24 * 50, // 50 days
LiquidityRemovalCancelPeriod: 12 * 60 * 6, // 6 hours
LiquidityRemovalLockPeriod: 12 * 60 * 5, // 5 hours
LiquidityRemovalCancelPeriod: 12 * 60 * 24 * 50, // 50 days
RewardPeriods: nil,
RewardPeriodStartTime: "",
RewardsLockPeriod: 12 * 60 * 24 * 14, // 14 days
Expand Down