You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On master currently opening a position is broken if there's more than one vpool. The tx fails with the message error updating reserve: price is over fluctuation limit.
Reason is that the checkFluctuationLimitRatio function look for a snapshot to compare with, but the GetLatestReserveSnapshot function returns a random vpool snapshot:
// GetLatestReserveSnapshot returns the last snapshot that was savedfunc (kKeeper) GetLatestReserveSnapshot(ctx sdk.Context, pair common.AssetPair) (
snapshot types.ReserveSnapshot, errerror,
) {
store:=prefix.NewStore(ctx.KVStore(k.storeKey), types.SnapshotsKeyPrefix)
iter:=store.ReverseIterator(nil, nil)
deferiter.Close()
for ; iter.Valid(); iter.Next() {
k.codec.MustUnmarshal(iter.Value(), &snapshot)
returnsnapshot, nil
}
return types.ReserveSnapshot{}, types.ErrNoLastSnapshotSaved
}
This results on using the eth:usd vpool to check the fluctuation limit of the btc:usd vpool:
On master currently opening a position is broken if there's more than one vpool. The tx fails with the message
error updating reserve: price is over fluctuation limit
.Reason is that the
checkFluctuationLimitRatio
function look for a snapshot to compare with, but theGetLatestReserveSnapshot
function returns a random vpool snapshot:This results on using the eth:usd vpool to check the fluctuation limit of the btc:usd vpool:
The text was updated successfully, but these errors were encountered: