Closed luziusmeisser closed 2 months ago
{
expP: 59811875000000000000000n,
bZchf0: 90000000000000000000000n,
bCoin0: 1000000000000000000000n,
size: 1000000000000000000n,
bZchf1: 30188750000000000000000n,
bCoin1: 1001000000000000000000n
}
1) buy 10x liq. price
{
expP: 5979097222222222183956n,
bZchf0: 90000000000000000000000n,
bCoin0: 1000000000000000000000n,
size: 10000000000000000000n,
bZchf1: 30209722222222222604880n,
bCoin1: 1010000000000000000000n
}
2) buy 1x liq. price
somehow, the actual cost is slightly higher then the price indicates
Price: 5979097222222222183956n,
size: 10000000000000000000n, **=> floatToDec18(1) aka 1 ether**
cost: 5979097222222222183956n **must be the same as price**
bZchf0: 90000000000000000000000n, **balance before**
bZchf1: 30209722222222222604880n, **balance after**
bZchf1 + cost: +90000694444444444444440 <--- this does not match, you pay more
bCoin0: 1000000000000000000000n, **collateral before**
bCoin1: 1010000000000000000000n, **collateral after**
if logic || or && ?
meaning, if its a self-owned position, should it still consider to clone, if exp. is within the clone-able timeframe? Or just in case its not your position AND within the timeframe of clone-able foreign position?
To fix