project-serum / serum-dex

Project Serum Rust Monorepo
https://projectserum.com
Apache License 2.0
629 stars 329 forks source link

settled amount didn't return in the token account #53

Open kal1er opened 3 years ago

kal1er commented 3 years ago

Hi, trying some script, forwarding future automated trading with pyserum, and i was testing about some of the functions. and having issues trying to settle funds and cancelling orders. Resolved the cancelling and here is the problem: About settle, i couldn't do so, because, apparently error on the base_wallet, in the settle request:

settl = market.settle_funds(
        owner=payer,
        open_orders=open_orders_account[0],
        base_wallet='De4FSZ2KakxHowj1TfVxos3tjoimbtrTtceoNasMwetW',
        quote_wallet='Hrr32WnYSqikhRRjHUpVTDarTApKUPu3fgdozg9PYrcZ'
    )

i had put my owner_wallet, and that's why it didn't worked. But i put by error the base_vault then no more error, i thought that's it, Yeah! but the amount didn't return in the token account... How that's possible? making a settle could result in lost of fund? it's not big deal, i was testing and the amount wasn't so big (0.001BTC), but hope it won't happen with big amount? here's the settled signature: https://explorer.solana.com/tx/8hhv4WuZxua2PKRtZmBBvhYDK8XQRgswV21CqpYownkJv3ivVkWD5adzAJYra1kUnuguTyUk95XGX2vgNV7Mbee what's the base vault? and is it possible to make unpossible settle transfert, somewhere else than owner token_wallet?

cryptoalert15 commented 3 years ago

have you managed to get out your funds? i did same mistake https://github.com/project-serum/serum-dex/issues/74

taulant01 commented 3 years ago

@kal1er @cryptoalert15 have you guys managed to get your funds? had a similar problem as well recently