-
Notifications
You must be signed in to change notification settings - Fork 0
/
prop214.go
33 lines (27 loc) · 938 Bytes
/
prop214.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package v9
import (
sdk "github.com/cosmos/cosmos-sdk/types"
gammkeeper "github.com/percosis-labs/percosis/v16/x/gamm/keeper"
"github.com/percosis-labs/percosis/v16/x/gamm/pool-models/balancer"
)
// Executes prop214, https://www.mintscan.io/percosis/proposals/214
// Run `percosisd q gov proposal 214` to see the text.
// It was voted in, and it has update instructions:
// Voting YES for this proposal would reduce the Pool 1 (PERCO/ATOM) spread factor from 0.3% to 0.2%
func ExecuteProp214(ctx sdk.Context, gamm *gammkeeper.Keeper) {
poolId := 1
pool, err := gamm.GetPoolAndPoke(ctx, uint64(poolId))
if err != nil {
panic(err)
}
balancerPool, ok := pool.(*balancer.Pool)
if !ok {
panic(ok)
}
balancerPool.PoolParams.SwapFee = sdk.MustNewDecFromStr("0.002")
// Kept as comments for recordkeeping. SetPool is now private:
// err = gamm.SetPool(ctx, balancerPool)
// if err != nil {
// panic(err)
// }
}