Commit 314f30e5 authored by Dev Ojha's avatar Dev Ojha
Browse files

tmp

parent 45ac35ae
Showing with 65 additions and 0 deletions
+65 -0
# V8 Upgrade
The v8 upgrade is an emergency upgraded coordinated according to osmosis governance proposals {X}, {Y} and {Z}
details...
\ No newline at end of file
package v8
const UpgradeName = "v8"
const UpgradeHeight = 1 // TODO
package v8
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
func RunForkLogic(ctx sdk.Context) {
ctx.Logger().Info("Applying emergency hard fork for v8.")
// Three different parts to this upgrade
// 1) Remove superfluid staking from Osmo/UST and Osmo/Luna
}
......@@ -17,6 +17,8 @@ service Msg {
returns (MsgBeginUnlockingAllResponse);
// MsgBeginUnlocking begins unlocking tokens by lock ID
rpc BeginUnlocking(MsgBeginUnlocking) returns (MsgBeginUnlockingResponse);
// MsgBeginUnlocking begins unlocking tokens by lock ID
rpc QuickBreakAllLocks(MsgQuickBreakAllLocks) returns (MsgQuickBreakAllLocksResponse);
}
message MsgLockTokens {
......@@ -49,3 +51,9 @@ message MsgBeginUnlocking {
];
}
message MsgBeginUnlockingResponse { bool success = 1; }
message MsgQuickBreakAllLocks {
string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
uint64 pool_ID = 2;
}
message MsgQuickBreakAllLocksResponse { bool success = 1; }
import json
filename = "balance_derived.json"
f = open(filename, 'r+')
obj = json.loads(f.read())
accs = obj['accounts']
res = {}
for k in accs.keys():
if len(accs[k]['bonded_by_select_pools']) > 0:
res[accs[k]['address']] = accs[k]['bonded_by_select_pools']
pool_id = '560'
bucket_denom = "ibc/BE1BB42D4BE3C30D50B68D7C41DB4DFCE9678E8EF8C539F6E6A9345048894FCC"
bucket_exp = 2
buckets = {}
for i in range(50):
buckets[i] = 0
for k in res.keys():
coins = res[k][pool_id]
for c in coins:
if c['denom'] != bucket_denom:
continue
amt = int(c['amount'])
binSize = len(bin(amt)[2:])
buckets[binSize] += 1
print(buckets)
for i in range(50):
print("number_of_LPs", )
\ No newline at end of file
......@@ -15,6 +15,11 @@ import (
// and queue them for deletion.
// See https://github.com/osmosis-labs/osmosis/issues/864
func (k Keeper) BeginUnwindSuperfluidAsset(ctx sdk.Context, epochNum int64, asset types.SuperfluidAsset) {
// TODO, steps:
// 1) Delete all intermediate accounts for this superfluid asset
// 2) Delete all synthetic locks for this asset
// 3) Set multipler to 0
// 4) Delete superfluid asset
// Right now set the TWAP to 0, and delete the asset.
k.SetOsmoEquivalentMultiplier(ctx, epochNum, asset.Denom, sdk.ZeroDec())
k.DeleteSuperfluidAsset(ctx, asset.Denom)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment