Skip to content

Commit d110681

Browse files
committed
Fix
1 parent c45b360 commit d110681

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/simulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def remove_liquidity_imbalance(self, amounts):
148148

149149
def calc_withdraw_one_coin(self, token_amount, i):
150150
xp = self.xp()
151-
xp_reduced = xp
151+
xp_reduced = list(xp)
152152

153153
D0 = self.D()
154154
D1 = D0 - token_amount * D0 // self.tokens
@@ -166,6 +166,6 @@ def calc_withdraw_one_coin(self, token_amount, i):
166166
self.x = [x // (p // 10 ** 18) for x, p in zip(xp_reduced, self.p)]
167167
dy = xp_reduced[i] - self.y_D(i, D1)
168168
self.x = [x // (p // 10 ** 18) for x, p in zip(xp, self.p)]
169-
dy_0 = (xp[i] - new_y)
169+
dy_0 = xp[i] - new_y
170170

171171
return dy, dy_0 - dy

0 commit comments

Comments
 (0)