SetProtocol / set-protocol-v2

Set Protocol V2
118 stars 94 forks source link

fix(PerpV2LeverageModuleV2): Round up during withdraw #249

Closed 0xSachinK closed 2 years ago

0xSachinK commented 2 years ago

In this transaction, rebalance fails because, (quoting @bweick from slack)

nvm so basically there 1.005 Sets we try to withdraw 13159 per Set which would calculate to 13224.795 
which is rounded down to 13224 so that's the amount we get back from Perp
When we then go to make a position out of it 13224/1.005 = 13158.20 so rounded down to 13158
And then we try to trade 13159
cgewecke commented 2 years ago

:tada: This PR is included in version 0.10.1-hhat.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: