unclescrooge (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 19, 2012, 11:14:52 PM |
|
Ok so I corrected and restore the positions.. One of you already had reopen a new long position (bigger than the previous one) so I didn't restore his previous one. I reimbursed the fees and losses charged for everyone involved. Please tell me if you see something wrong, as I did all that manually. I had to pass manual orders to correct this so they could be executed on mtgox (and thus the system stay hedged/balanced). I'd like to renew my apologies. I corrected the bug that led to this (the ticker returning 0 instead of raising an error). I'll make forced orders public on the public trade history page. The other problem is more tricky. I will have to upgrade the servers to face the increase of user base. I will also see how I can code control to prevent the same module being executed twice (and no Davout this is not a race condition problem). I'll keep you informed about it. Now I'm going to sleep, if any question I'll check my mails ( admin@bitfinex.com) tomorrow. Raphael
|
|
|
|
yogi
Legendary
Offline
Activity: 947
Merit: 1042
Hamster ate my bitcoin
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 19, 2012, 11:27:47 PM |
|
Thank you Raphael, everything looks fine now.
Another thing though, not a big problem, but the radio button on the Credit Available table keeps defaulting back to 60 days. This occurs when the table refreshes. So if I select 1 day, and then the refresh occurs before I click the buy/sell button. I could inadvertently order a 60 day loan instead of the 1 day loan I wanted.
|
|
|
|
unclescrooge (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 20, 2012, 11:17:51 AM |
|
Thanks Yogi, I'll take a look and correct it ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) A little update about last night. This was the result of two bug: the ticker price was set to 0 when mtgox doesn't answer properly, and there wasn't a proper check to see if there wasn't a double margin call in progress. So here is what happened: Mtgox didn't answer properly to bitfinex for a few seconds. The ticker price went to 0. This trigger a margin call for 5 long users. Because there wasn't a proper check to see if there was already a margin call in progress (already a "forced order"), the margin call got triggered twice. All positions has been restored to what they were before the incident. Credits has been relinked to this new positions. User balances has been restored. This has cost me about 100 usd and the patience of my soon-to-be wife for a wasted evening (I wasn't easy to live yesterday ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif) ). Mistakes happen. Mistakes make us stronger. Bitfinex is now stronger. The proper checks have been implemented so that these fake margin call and double forced orders won't happen again. What you can trust and what you can be sure of is that your money is safe with us. There will never been a hack where all money is lost, because of our UNIQUE security set-up: https://bitfinex.com/pages/securityI want to insist on that because this is something you can count on. What now? The big development of Bitfinex is over. The general behavior (way lending and margin system works,...) won't change. It's time for bug fixes and interface improvment. So I'd like to thank everyone that is trying bitfinex. As you can see, this is a beta, but we are dedicated to make your experience and your profits as good as possible. If any questions, I'm available on admin@bitfinex.comRaphael
|
|
|
|
myself
Legendary
Offline
Activity: 938
Merit: 1000
chaos is fun...…damental :)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 20, 2012, 12:21:33 PM |
|
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FNtZ6o.jpg&t=665&c=2LbZ7dtD0Fal9Q) Public log: Forced executed order do not appear currently on the public log, I'll update it so they are also public.
|
Los desesperados publican que lo inventó el rey que rabió, porque todo son en el rabias y mas rabias, disgustos y mas disgustos, pezares y mas pezares; si el que compra algunas partidas vé que baxan, rabia de haver comprado; si suben, rabia de que no compró mas; si compra, suben, vende, gana y buelan aun á mas alto precio del que ha vendido; rabia de que vendió por menor precio: si no compra ni vende y ván subiendo, rabia de que haviendo tenido impulsos de comprar, no llegó á lograr los impulsos; si van baxando, rabia de que, haviendo tenido amagos de vender, no se resolvió á gozar los amagos; si le dan algun consejo y acierta, rabia de que no se lo dieron antes; si yerra, rabia de que se lo dieron; con que todo son inquietudes, todo arrepentimientos, tododelirios, luchando siempre lo insufrible con lo feliz, lo indomito con lo tranquilo y lo rabioso con lo deleytable.
|
|
|
unclescrooge (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 20, 2012, 03:18:22 PM |
|
Yep, that's you, forced closed without mercy ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif)
|
|
|
|
yogi
Legendary
Offline
Activity: 947
Merit: 1042
Hamster ate my bitcoin
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 20, 2012, 09:38:44 PM |
|
What now? The big development of Bitfinex is over. The general behavior (way lending and margin system works,...) won't change. It's time for bug fixes and interface improvment. So I'd like to thank everyone that is trying bitfinex. As you can see, this is a beta, but we are dedicated to make your experience and your profits as good as possible.
At the risk of becoming a pain, I would like to suggest one more slight modification. I would personally find it desirable if the system took into account the margin that would become available by closing any active positions when placing an order. For example, assume I have a margin of 1 BTC and a leverage of 5:1. If I had a long position of 5 BTC and I place an order at a higher price to sell 10 BTC I get an insufficient margin message. Where as, the selling of the first 5 BTC, by closing the active position, would provide sufficient margin to borrow and then sell the remaining 5 BTC.
|
|
|
|
myself
Legendary
Offline
Activity: 938
Merit: 1000
chaos is fun...…damental :)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2012, 08:18:06 AM |
|
For example, assume I have a margin of 1 BTC and a leverage of 5:1. If I had a long position of 5 BTC and I place an order at a higher price to sell 10 BTC I get an insufficient margin message. Where as, the selling of the first 5 BTC, by closing the active position, would provide sufficient margin to borrow and then sell the remaining 5 BTC.
what you are asking is to count equity(total wallet+gains) to determine the leverage cap that can work perfectly unless someone decide to dump the price, what you are asking for is the default way of doing things on most forex brokers but this is the bitcoin world imo this will require -much more volume trading per day --so at the current price the volume should be quite above 200 000 per day in a way to guarantee that someone is always willing to buy and no trader can move the price 5% -guaranteed stops orders by mtgox -a faster trading engine by mtgox
|
Los desesperados publican que lo inventó el rey que rabió, porque todo son en el rabias y mas rabias, disgustos y mas disgustos, pezares y mas pezares; si el que compra algunas partidas vé que baxan, rabia de haver comprado; si suben, rabia de que no compró mas; si compra, suben, vende, gana y buelan aun á mas alto precio del que ha vendido; rabia de que vendió por menor precio: si no compra ni vende y ván subiendo, rabia de que haviendo tenido impulsos de comprar, no llegó á lograr los impulsos; si van baxando, rabia de que, haviendo tenido amagos de vender, no se resolvió á gozar los amagos; si le dan algun consejo y acierta, rabia de que no se lo dieron antes; si yerra, rabia de que se lo dieron; con que todo son inquietudes, todo arrepentimientos, tododelirios, luchando siempre lo insufrible con lo feliz, lo indomito con lo tranquilo y lo rabioso con lo deleytable.
|
|
|
yogi
Legendary
Offline
Activity: 947
Merit: 1042
Hamster ate my bitcoin
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2012, 01:02:35 PM |
|
I think it could probably be implemented more simply than that.
First stop blocking the orders with the insufficient margin message.
Secondly, handle the insufficient margin problem in the same way you handle the 'no reserve' problem. So orders go into the open orders list and are fulfilled as much as the existing margin will allow. Remaining order stays in the open orders list but the status says 'no margin' and is not processed.
|
|
|
|
myself
Legendary
Offline
Activity: 938
Merit: 1000
chaos is fun...…damental :)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2012, 02:14:59 PM |
|
I think it could probably be implemented more simply than that. the implementation is not the problem, the problem is what's happening when the market goes against your positions and you get a margin call but your funds do not cover total loss example, i know you can do the math but to let it clear if anyone have questions and I dont include fees and interest --you are long since 13.20 and you put your stop loss at 13usd --I decide to dump and sell 30 000 bitcoins --my order in mtgox is number N --mtgox start to process my order --the price gets at 13usd --your stop loss is triggered --your order in mtgox is N+23 --mtgox will process my order that the other 22 orders and then yours --but you get processed at 12.50 and you got 50 cents slippage,(13 was the initial stop but u get out at 12.50) your account funds needs to cover the 70 cents loss per bitcoins if not bitfinex will lose money in case of a loss stock and forex brokers will call your home and tell you have 48h to pay the loss or get sued you can see that there is a big difference of condition from "real world" to bitcoin world now lets look if we count total equity (wallet funds+gains) for leverage --again your are long from 13.20 100 bitcoins based on your deposit of 20 btc --at 13.50 you have gain 100x0.30=30 usd --30x5=150, 150/13.50=11.11 so u can add 11 bitcoin to your long --your positions get closed to same 12.50 --11x13.50= 148.5 11x12.5=137 148.5-137=11.5 loss --100x13.20=1320 100x12.50=1250 1320-1250=70 loss --total loss 70+11.5 = 81.5 ---if you don't use equity for leverage your loss is just that 70 --total wallet value 20*12.50=250 --81.5/12.50=6.52 so bitfinex will take 6.52 BTC from your account in order to pay the user that lend you USD to go long (fees not included) what happen if the market does not stop at 12.50 and it stops at 10USD and you position is closed at 10USD Secondly, handle the insufficient margin problem in the same way you handle the 'no reserve' problem. So orders go into the open orders list and are fulfilled as much as the existing margin will allow. Remaining order stays in the open orders list but the status says 'no margin' and is not processed. so if a user wants to go long 100 bitcoins but only get funds for 89 bitcoins, fill the 89 and ignore the remaining 11
|
Los desesperados publican que lo inventó el rey que rabió, porque todo son en el rabias y mas rabias, disgustos y mas disgustos, pezares y mas pezares; si el que compra algunas partidas vé que baxan, rabia de haver comprado; si suben, rabia de que no compró mas; si compra, suben, vende, gana y buelan aun á mas alto precio del que ha vendido; rabia de que vendió por menor precio: si no compra ni vende y ván subiendo, rabia de que haviendo tenido impulsos de comprar, no llegó á lograr los impulsos; si van baxando, rabia de que, haviendo tenido amagos de vender, no se resolvió á gozar los amagos; si le dan algun consejo y acierta, rabia de que no se lo dieron antes; si yerra, rabia de que se lo dieron; con que todo son inquietudes, todo arrepentimientos, tododelirios, luchando siempre lo insufrible con lo feliz, lo indomito con lo tranquilo y lo rabioso con lo deleytable.
|
|
|
unclescrooge (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2012, 02:21:45 PM |
|
Another thing though, not a big problem, but the radio button on the Credit Available table keeps defaulting back to 60 days. This occurs when the table refreshes. So if I select 1 day, and then the refresh occurs before I click the buy/sell button. I could inadvertently order a 60 day loan instead of the 1 day loan I wanted.
Hi, This has been changed, the chosen period won't revert back to 60 days when reloading the table. At the risk of becoming a pain, I would like to suggest one more slight modification.
I would personally find it desirable if the system took into account the margin that would become available by closing any active positions when placing an order.
For example, assume I have a margin of 1 BTC and a leverage of 5:1. If I had a long position of 5 BTC and I place an order at a higher price to sell 10 BTC I get an insufficient margin message. Where as, the selling of the first 5 BTC, by closing the active position, would provide sufficient margin to borrow and then sell the remaining 5 BTC.
Myself has well explained it. It is true that Bitfinex is very pessimistic in letting or not a user placing an order, because we don't have, for now, the possibility of having negative balance. Now, to avoid this, in your example where you have a 5 BTC long position, just place 2 sell orders of 5 btc, and you won't get an insufficient margin error ![Wink](https://bitcointalk.org/Smileys/default/wink.gif)
|
|
|
|
yogi
Legendary
Offline
Activity: 947
Merit: 1042
Hamster ate my bitcoin
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2012, 02:44:25 PM |
|
I think it could probably be implemented more simply than that. the implementation is not the problem, the problem is what's happening when the market goes against your positions and you get a margin call but your funds do not cover total loss example, i know you can do the math but to let it clear if anyone have questions and I dont include fees and interest --you are long since 13.20 and you put your stop loss at 13usd --I decide to dump and sell 30 000 bitcoins --my order in mtgox is number N --mtgox start to process my order --the price gets at 13usd --your stop loss is triggered --your order in mtgox is N+23 --mtgox will process my order that the other 22 orders and then yours --but you get processed at 12.50 and you got 50 cents slippage,(13 was the initial stop but u get out at 12.50) your account funds needs to cover the 70 cents loss per bitcoins if not bitfinex will lose money in case of a loss stock and forex brokers will call your home and tell you have 48h to pay the loss or get sued you can see that there is a big difference of condition from "real world" to bitcoin world now lets look if we count total equity (wallet funds+gains) for leverage --again your are long from 13.20 100 bitcoins based on your deposit of 20 btc --at 13.50 you have gain 100x0.30=30 usd --30x5=150, 150/13.50=11.11 so u can add 11 bitcoin to your long --your positions get closed to same 12.50 --11x13.50= 148.5 11x12.5=137 148.5-137=11.5 loss --100x13.20=1320 100x12.50=1250 1320-1250=70 loss --total loss 70+11.5 = 81.5 ---if you don't use equity for leverage your loss is just that 70 --total wallet value 20*12.50=250 --81.5/12.50=6.52 so bitfinex will take 6.52 BTC from your account in order to pay the user that lend you USD to go long (fees not included) what happen if the market does not stop at 12.50 and it stops at 10USD and you position is closed at 10USD This, as far as I can see, is a problem you are going to face anyway. Secondly, handle the insufficient margin problem in the same way you handle the 'no reserve' problem. So orders go into the open orders list and are fulfilled as much as the existing margin will allow. Remaining order stays in the open orders list but the status says 'no margin' and is not processed. so if a user wants to go long 100 bitcoins but only get funds for 89 bitcoins, fill the 89 and ignore the remaining 11 No, they are not ignored. They are pending until sufficient margin becomes available. Another thing though, not a big problem, but the radio button on the Credit Available table keeps defaulting back to 60 days. This occurs when the table refreshes. So if I select 1 day, and then the refresh occurs before I click the buy/sell button. I could inadvertently order a 60 day loan instead of the 1 day loan I wanted.
Hi, This has been changed, the chosen period won't revert back to 60 days when reloading the table. OK, thank you Raphael. It is true that Bitfinex is very pessimistic in letting or not a user placing an order, because we don't have, for now, the possibility of having negative balance. Now, to avoid this, in your example where you have a 5 BTC long position, just place 2 sell orders of 5 btc, and you won't get an insufficient margin error ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) Ah, OK, thanks.
|
|
|
|
myself
Legendary
Offline
Activity: 938
Merit: 1000
chaos is fun...…damental :)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2012, 03:09:12 PM |
|
This, as far as I can see, is a problem you are going to face anyway.
yes and no, on my example the 30USD gain is still a "theoretical" gain, that gain is tied up to the ability of closing a position and materialize said gain, that 30USD have a condition attached, yes BFX face the loss problem all the time, excluding "theoretical" gains (the 30USD from my example) when computing maximum leverage does reduce the risk of loss and is also true that it reduce user ability to take bigger risk, for now imo is better to stay like is now
|
Los desesperados publican que lo inventó el rey que rabió, porque todo son en el rabias y mas rabias, disgustos y mas disgustos, pezares y mas pezares; si el que compra algunas partidas vé que baxan, rabia de haver comprado; si suben, rabia de que no compró mas; si compra, suben, vende, gana y buelan aun á mas alto precio del que ha vendido; rabia de que vendió por menor precio: si no compra ni vende y ván subiendo, rabia de que haviendo tenido impulsos de comprar, no llegó á lograr los impulsos; si van baxando, rabia de que, haviendo tenido amagos de vender, no se resolvió á gozar los amagos; si le dan algun consejo y acierta, rabia de que no se lo dieron antes; si yerra, rabia de que se lo dieron; con que todo son inquietudes, todo arrepentimientos, tododelirios, luchando siempre lo insufrible con lo feliz, lo indomito con lo tranquilo y lo rabioso con lo deleytable.
|
|
|
unclescrooge (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2012, 03:12:41 PM |
|
for now imo is better to stay like is now I agree with this and this will stay as it is until further notice ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Thanks for your feedback Yogi though, this is always appreciated and considered ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
yogi
Legendary
Offline
Activity: 947
Merit: 1042
Hamster ate my bitcoin
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2012, 05:49:45 PM |
|
Ok, thanks guys. I very much appreciate you both taking the time to respond to my posts ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
tbcoin
Legendary
Offline
Activity: 1022
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 23, 2012, 12:04:01 PM |
|
Error editing settings NoMethodError in UsersController#update ... ... ...
|
|
|
|
myself
Legendary
Offline
Activity: 938
Merit: 1000
chaos is fun...…damental :)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 27, 2012, 05:17:43 PM |
|
i am going to do a ask question about bitfinex on reddit i think they call it AMA or something like that http://www.reddit.com/r/Bitcoin/comments/15ixor/i_am_adviser_for_bitfinexcom_so_ask_questions_if/
|
Los desesperados publican que lo inventó el rey que rabió, porque todo son en el rabias y mas rabias, disgustos y mas disgustos, pezares y mas pezares; si el que compra algunas partidas vé que baxan, rabia de haver comprado; si suben, rabia de que no compró mas; si compra, suben, vende, gana y buelan aun á mas alto precio del que ha vendido; rabia de que vendió por menor precio: si no compra ni vende y ván subiendo, rabia de que haviendo tenido impulsos de comprar, no llegó á lograr los impulsos; si van baxando, rabia de que, haviendo tenido amagos de vender, no se resolvió á gozar los amagos; si le dan algun consejo y acierta, rabia de que no se lo dieron antes; si yerra, rabia de que se lo dieron; con que todo son inquietudes, todo arrepentimientos, tododelirios, luchando siempre lo insufrible con lo feliz, lo indomito con lo tranquilo y lo rabioso con lo deleytable.
|
|
|
|
myself
Legendary
Offline
Activity: 938
Merit: 1000
chaos is fun...…damental :)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 01, 2013, 08:14:35 PM |
|
plz pm unclescrooge to code the feature 41 and 44 ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
Los desesperados publican que lo inventó el rey que rabió, porque todo son en el rabias y mas rabias, disgustos y mas disgustos, pezares y mas pezares; si el que compra algunas partidas vé que baxan, rabia de haver comprado; si suben, rabia de que no compró mas; si compra, suben, vende, gana y buelan aun á mas alto precio del que ha vendido; rabia de que vendió por menor precio: si no compra ni vende y ván subiendo, rabia de que haviendo tenido impulsos de comprar, no llegó á lograr los impulsos; si van baxando, rabia de que, haviendo tenido amagos de vender, no se resolvió á gozar los amagos; si le dan algun consejo y acierta, rabia de que no se lo dieron antes; si yerra, rabia de que se lo dieron; con que todo son inquietudes, todo arrepentimientos, tododelirios, luchando siempre lo insufrible con lo feliz, lo indomito con lo tranquilo y lo rabioso con lo deleytable.
|
|
|
lucif
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 462
Merit: 250
Clown prophet
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 01, 2013, 08:29:53 PM |
|
lucif: my sell market orders hang for 10-20 minutes lucif: credit book was fine. there were 86+ btc for sell for 60 days lucif: and my tradable balance was $300+ lucif: I tried to short 10 coins lucif: Market sell order on margin trade. It says order active and nothing happened lucif: So that order was there for 10-20 mins then i canceled it lucif: put another and same story lucif: after some hours I tried to short 5 btc and it worked fine
|
|
|
|
unclescrooge (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 02, 2013, 01:44:23 PM |
|
Hi Lucif,
Yes the trading engine did stalled yesterday.
To avoid this in the future, I added a system monitor that restart stalled workers if necessary.
Thanks for your feedback Raphael
|
|
|
|
|