Author Topic: [worker] Python-steem and uptick (1.14.52)  (Read 17673 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
For those that want to use `uptick` to build their own 'scripts' .. e.g. for trading ... you may want to take a look at this example:
https://gist.github.com/1f9a296447fd63f8b3ee446afc10bf14

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
I have made a new proposal `1.10.1805`. This proposal
**a)** claims the BTS in the vesting blance,
**b)** sells them for bitUSD at up to 5% premium,
**c)** sends 4k bitUSD to `chainsquad` for the worker payment and
**d)** sends another 100 bitUSD to `chainsquad` for the API node.

As you can see from the milestones in the worker proposal
    https://github.com/xeroc/worker-proposals/blob/master/2017-02.md
and the code provided in
   https://github.com/xeroc/python-bitshares
and
   https://github.com/xeroc/uptick
 .. you can see that milestone 2 has been reached (overfullfilled actually)

The script that proposes the proposal above can be found here:
   https://github.com/xeroc/worker-proposals/blob/master/2017-02-claim-2.py

The proposal expires in 4 days.

Kind regards
  -- Fabian

Remark:
There is currently 23,822 bitUSD worth BTS that are now owned by the shareholders and not me due
to going through a multisig worker with USD pricing instead of my own worker! Given the 2.5x ratio in
mind, this makes an opportunity cost of 9500 bitUSD for me.
« Last Edit: April 20, 2017, 11:00:10 am by xeroc »

Offline tbone

  • Hero Member
  • *****
  • Posts: 632
    • View Profile
  • BitShares: tbone2
Is this Leonardo maybe? Because if it is that could be huge, that would provide bot cross trading between mayor centralized exchanges
and DEX, and as a bonus, providing DEX exposure to big game players.

That could certainly be financed by new worker. How much fund are needed in your estimation?

This has value.  How much value it has depends on a) what functionalities this company offers and intends to integrate with Bitshares, b) how many existing users they have who could take advantage of this new support for Bitshares, and c) whether other softwares that are compatible with Poloniex would now also become compatible with Bitshares.   And then of course the worker cost also matters.


Offline Geneko

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Is this Leonardo maybe? Because if it is that could be huge, that would provide bot cross trading between mayor centralized exchanges
and DEX, and as a bonus, providing DEX exposure to big game players.

That could certainly be financed by new worker. How much fund are needed in your estimation? 

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Recently, I was contacted by a company that builds graphical trading software/bots for crypto exchanges. They were asking about how to best integrate with BitShares.
During the discussion, we came to the conclusion that the easiest way of doing so would be to run a local API endpoint. You can think of this like having a background
process that basically mirrors the API of poloniex, or that of BTC38 or any other exchange, but you don't connect to poloniex's server but to 'localhost' and see all the same
functionality.

So, the idea would be to build something that would work like this for the enduser:

1) Install piston-polo
2) Run piston-polo --user xeroc --password mySecret --port 8080
3) Modify your polo bot to use 'localhost:8080' instead of api.poloniex.com, and use your credentials as login, or API key
4) Run your bot as if it was using poloniex

Do you think this has value? How can this be funded (a feature like that is not covered by the milestones in the worker discussed here)? Someone here willing to help me put this thing together?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Convinced?

Got it. So shortly speaking, you are long on BTS, but committee still pays this worker in bitUSD, because it is better to have the pay rate fixed this way. It is up to committee how to get bitUSD (borrow or buy), and it is up to you how to spend them (hoard or short), depending on current market . Makes sense.

P.S. Finally, a market pegged asset is actually used exactly the way a contract for difference is supposed to be used, i.e. to fix the price of a long term contract, a worker contract in this case. And this is very cool.
Exactly!

Just one minor correction at this point. The committee-account is part of the multisig account and part of the owner permission. However, in order to be able to do things more quickly there are a bunch of other trusted entities in the group that can approve a proposal.
The reason here is that in order for the commitee-account to approve a proposal, you need to reach 51% approval on the committee members and then wait for the committee review period for the approval of the proposal to execute (just the approval, not the proposal itself) .. In the end, going through the committee for payouts is extremely slow. That's why the active permission is a 3 of 5 setup with trusted members of the community, namely: blocktrades, cass, svk, fox, and chainsquad .. (the owner is the same plus the committee-account).
Basically just an implementation detail :D

Offline yvv

  • Hero Member
  • *****
  • Posts: 1186
    • View Profile
Convinced?

Got it. So shortly speaking, you are long on BTS, but committee still pays this worker in bitUSD, because it is better to have the pay rate fixed this way. It is up to committee how to get bitUSD (borrow or buy), and it is up to you how to spend them (hoard or short), depending on current market . Makes sense.

P.S. Finally, a market pegged asset is actually used exactly the way a contract for difference is supposed to be used, i.e. to fix the price of a long term contract, a worker contract in this case. And this is very cool.
« Last Edit: March 21, 2017, 08:34:14 pm by yvv »

Offline Geneko

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Convinced?

I am. It is better this way, only if we could adjust all workers and witness pay to this method. 
« Last Edit: March 21, 2017, 08:10:30 pm by Geneko »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Now increasing liquidity in the USD:BTS market:

I don't get it. multisig-worker bought bitUSD at 210 BTS/bitUSD and now you are selling them at 180 BTS/bitUSD. This looks like expensive way to increase liquidity.

Well, the bigger picture is that the bitshares shareholders paid me in bitUSD instead of paying me in company stock (BTS). If the worker was paying me BTS directly (not going through multisig group), then I would end up with BTS worth twice as much as what they have been valued at when I created the worker - simply because the price has been raising for a couple days now already.

So the multsig group removes all the volatility and pays the worker in bitUSD what he asked for.

Now that `chainsquad` has been paid for the work delivered, it is our freedom to do with the USD what we like, that includes keeping them in the wallet instead of selling them - However, we believe in the future of BTS (for multiple reasons) and we also mentioned increased liquidity as one benefit of the whole setup. That is why we are placing a sell order at market price + a few percent.

In the end, it is actually a good deal for the shareholders even tho it is a bad deal short term.
Arguable, it could have been better to borrow bitUSD instead of buying them, but that would leave the multisig account (and thus the shareholders) with an open short position - arguable, too risky.

Also keep in mind that other exchanges pay for their liquidity as well. In this case, you even get volume (the multisig worker buying bitUSD) and you get liquidity from the freelancer (chainsquad) selling bitUSD.

Convinced?

Offline yvv

  • Hero Member
  • *****
  • Posts: 1186
    • View Profile
Now increasing liquidity in the USD:BTS market:

I don't get it. multisig-worker bought bitUSD at 210 BTS/bitUSD and now you are selling them at 180 BTS/bitUSD. This looks like expensive way to increase liquidity.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Now increasing liquidity in the USD:BTS market:

Offline Thom

Thx for the update, keep us posted on progress / people involved with Foundation setup.
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
What is the ETA on the Foundation becoming operational?
My partners ran into some private trouble .. both of them.
But there are other leads that BitShares can benefit from. There is plenty of work and we are on the way of getting the required funding to "bring it on" :)

Offline Thom

Excellent xeroc! I hope this concept takes hold and it becomes a more reliable and superior method to fund workers.

What is the ETA on the Foundation becoming operational?

Update

A couple minutes ago, we have process the first "combo-proposal" in order to
1.) Obtain the worker pay
2.) Obtain 4350 bitUSD from the BTS:USD market
3.) Send the USD to chainsquad (in 4 chunks according to the proposal)

The script that generated the combo-proposal can be found here:
https://github.com/xeroc/worker-proposals/blob/master/2017-02-claim-1.py

Obviously, it uses python-bitshares.

As a remark, after the approval of the proposal by 3 parties in the multisig group, the transaction executed instantly and created some volume in the DEX.

This is the message I have sent to the people involved in the multisig group
Quote
It's time to continue our little multisig experiment. I have created a proposal that a) claims all BTS from the worker, buys USD and sends USD to chainsquad: 1.10.1457.

I would appreciate your approval.

All points in the first milestone (https://github.com/xeroc/worker-proposals/blob/master/2017-02.md) have been reached, code is published and working (the proposal has been created with that library) - milestone 2 is almost ready, except for the trading algorithm specific code.

Feedback is welcome. Please approve the proposal until "2017-03-21T11:27:23" (UTC) .. then we can see if everything works as expected ..

PS. this is not meant for the public as I don't want anyone to take advantage of the rather big USD-buy order that this proposal is going to create (+fill)

I'd say, the whole setup works nicely and I recommend to consider it more actively fro future workers.

Regards
 -- Faban
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Update

A couple minutes ago, we have process the first "combo-proposal" in order to
1.) Obtain the worker pay
2.) Obtain 4350 bitUSD from the BTS:USD market
3.) Send the USD to chainsquad (in 4 chunks according to the proposal)

The script that generated the combo-proposal can be found here:
https://github.com/xeroc/worker-proposals/blob/master/2017-02-claim-1.py

Obviously, it uses python-bitshares.

As a remark, after the approval of the proposal by 3 parties in the multisig group, the transaction executed instantly and created some volume in the DEX.

This is the message I have sent to the people involved in the multisig group
Quote
It's time to continue our little multisig experiment. I have created a proposal that a) claims all BTS from the worker, buys USD and sends USD to chainsquad: 1.10.1457.

I would appreciate your approval.

All points in the first milestone (https://github.com/xeroc/worker-proposals/blob/master/2017-02.md) have been reached, code is published and working (the proposal has been created with that library) - milestone 2 is almost ready, except for the trading algorithm specific code.

Feedback is welcome. Please approve the proposal until "2017-03-21T11:27:23" (UTC) .. then we can see if everything works as expected ..

PS. this is not meant for the public as I don't want anyone to take advantage of the rather big USD-buy order that this proposal is going to create (+fill)

I'd say, the whole setup works nicely and I recommend to consider it more actively fro future workers.

Regards
 -- Faban