Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - theoretical

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 12 13 ... 34
76
General Discussion / Re: Burning is Still Alive and Well
« on: June 09, 2015, 07:39:23 pm »
there is a third scenario : 1000 new users come in after the hard work was done by the worker marketer who spent 30000USD per month , but each of those users only generates 20USD fees per person in this year . 

The problem is the marketer's pay needs to be based on his performance.  In particular, $20,000 needs to be an upper bound on what this particular marketer gets paid.  Letting this marketer be a worker means their pay is less tightly coupled to their performance, which is why bytemaster says:

workers shouldn't be doing marketing.   I do not support using worker pay to fund marketing campaigns.   Let the marketers speculate on their cost/reward ratio.

If some marketer brings in 1000 users with $20 in transaction volume per year, then they will get paid less than $20,000 per year from the referral program.  (How much less depends on what the referral split is.)

If that marketer's costs are $30,000 per month, those costs are coming out of the marketer's own pocket.  An imbalance can still occur, but the pain will be limited to the marketer's own funds.  The referral program allows each individual marketer to reap the rewards of their success without socializing the risk of their failure.

77

Only fees above a certain threshold defined by consensus must vest.   This means that in practice only the following fees require vesting:

1. Premium Name Registration
2. Lifetime and Annual Memberships
3. Large Data Transactions
4. Symbol Name Registration

Other fees (transfers, market orders, etc) will be below the threshold and thus vest immediately.

78
I would like clarification on whether the rate that is pulled from the reserve pool is set by delegates or hard coded (or maybe it is set by delegates but with a hard-coded upper limit?).

TLDR:  Set by delegates, but with a hard-coded upper limit of 17 / 4294967296 of the reserve pool's value per second, with daily compounding.

I wrote the code which actually implements this, and was heavily involved in its design, so I can answer this question.  (In fact the image xeroc posted in this thread is based on a design diagram I drew on a white board.)

The upper limit on witness plus worker pay is equal to a fraction of the reserve pool.  Here's part of the get_max_budget() function:

Code: [Select]
   int64_t dt = (now - dpo.last_budget_time).to_seconds();

   share_type reserve = core.burned(*this) + core_dd.accumulated_fees;

   fc::uint128_t budget_u128 = reserve.value;
   budget_u128 *= uint64_t(dt);
   budget_u128 *= GRAPHENE_CORE_ASSET_CYCLE_RATE;
   //round up to the nearest satoshi -- this is necessary to ensure
   //   there isn't an "untouchable" reserve, and we will eventually
   //   be able to use the entire reserve
   budget_u128 += ((uint64_t(1) << GRAPHENE_CORE_ASSET_CYCLE_RATE_BITS) - 1);
   budget_u128 >>= GRAPHENE_CORE_ASSET_CYCLE_RATE_BITS;

It sets an upper bound on the budget equal to the reserve pool times a hardcoded factor of 17 / 2**32 per day.  Since we know the initial float (2.5 billion) and initial reserve (1.2 billion), this is enough information to calculate the annual monetary inflation with your favorite calculator (e.g. a Python shell):

Code: [Select]
>>> (1 - (1 - (17. / 2**32 * 60 * 60 * 24)) ** (365*1)) * 1.2e9 / 2.5e9
0.0563356758462306

It is a little tricky to get the compounding exactly right in the above computation (intraday is non-compounding, daily is compounding).  That number's returned from get_max_budget(), let's look at what happens to that number next:

Code: [Select]
      share_type available_funds = get_max_budget( now );

      share_type witness_budget = gpo.parameters.witness_pay_per_block.value * blocks_to_maint;
      witness_budget = std::min( witness_budget, available_funds );
      available_funds -= witness_budget;

      fc::uint128_t worker_budget_u128 = gpo.parameters.worker_budget_per_day.value;
      worker_budget_u128 *= uint64_t(time_to_maint);
      worker_budget_u128 /= 60*60*24;

      share_type worker_budget;
      if( worker_budget_u128 >= available_funds.value )
         worker_budget = available_funds;
      else
         worker_budget = worker_budget_u128.to_uint64();
      available_funds -= worker_budget;

      share_type leftover_worker_funds = worker_budget;
      pay_workers( leftover_worker_funds );
      available_funds += leftover_worker_funds;

      // available_funds is money we could spend, but don't want to.
      // we simply let it evaporate back into the reserve.
   }

gpo.parameters is the list of parameters under the delegates' control.  So the delegates set the witness pay per block and the total worker budget per day, to get a daily budget with two line items (witnesses and workers).  This delegate-set budget is restricted based on available_funds which is initially the result of get_max_budget(), and reduced by the amount spent on each line item as it is processed.  Witness are paid first, workers are paid second, and any leftover goes into the reserve.

Where I've used the word "daily" I actually mean "per maintenance block."  The maintenance block frequency will initially be daily, but it is one of the delegate-settable parameters.

79
Technical Support / Re: Announcing BitShares 2.0
« on: June 08, 2015, 08:05:31 pm »
that means no traditional marketing methods would even work (like google ads)

nope, I think this referral program is a waste of time :<

You're worried that a referrer will have to run a full node, create a transaction on the user's behalf, get the user to sign it and return the signed tx, then broadcast the tx.

We realized this would be a problem soon after the initial design of the referral system, and we have a solution.  That's what the registrar is for.  Essentially we split the referral role into two parts:  the referrer can be a traditional internet marketer, all they have to do is get the user to click a link to some hosted wallet with ?r=youraccount.  The operator of the hosted wallet is a registrar who takes care of all the hard blockchain stuff.  The referrer and registrar split the commission (and the split doesn't have to be 50-50, any percentage is possible at the blockchain level.)

Any good marketer who can collect users can be their own registrar and get 100% of the commission, but marketers may not want to deal with the technology headaches of being a registrar.

By making it easy for them to split their commissions, any marketer (referrer) can partner with any technologist (registrar) and maximize their value because both are focused on their specialty instead of trying to simultaneously master both marketing and technology.

The official hosted wallet website will function as a registrar based on ?r= parameter on incoming links, but competing registrars will almost certainly spring up.  The free market should allow opportunity for a variety of cooperative and competitive relationships to form.

I should also note that payouts are based on income and vest for some time, which greatly mitigates a variety of potential referral abuses.

80
Technical Support / Re: Announcing BitShares 2.0
« on: June 08, 2015, 06:14:07 pm »
There's a lot of awesome stuff here.  A metric ton of new information.

81
General Discussion / Re: Shuffle Bounty $200 BitUSD
« on: May 06, 2015, 07:32:50 pm »
I've been placed in charge of deciding on a winner for this thread.

This problem sounds a lot like something that might be on a final exam in a graduate level algorithms course.

Before seeing the solutions here, I came up with my own solution:

- Pick the delegate which will occupy the most constrained slot from the list of delegates which are eligible to occupy it, striking the delegate from the list of eligible delegates.
- Advance to the next-most-constrained slot, adding any additional delegate(s) which are eligible for it.
- Repeat until you run out of slots.

I also came up with some easy optimizations:

- Striking and inserting may be implemented efficiently by replacing the stricken item with the newly inserted item.
- Striking may be implemented efficiently by swapping the stricken item with the final item, then reducing the vector size by 1.

Both hrossik and pc implemented the following solution:

- Place the most constrained delegate in a slot for which it is eligible, striking the occupied slot from the list of available slots.
- Advance to the next-most-constrained delegate, adding any additional slot(s) for which it is eligible.
- Repeat until you run out of delegates.

It is clear that these community solutions are simply a "mirror" of my solution, indexing the opposite way.  It is also clear that the optimizations apply equally to both solutions.

tonyk2 and arhag came to a similar solution as hrossik and pc, but tonyk2 and arhag are O(n^2) due to no explicit tracking of the free slots.

- arhag went to heroic lengths to provide high-quality uniformly distributed random numbers.  I consider these efforts to be orthogonal to the task at hand, as pseudo-randomly generating integers uniformly over some range is a problem which is well-understood.
- pc's solution is more "idiomatic" C++, and written against BitShares.
- hrossik's solution was easier to read than pc's
- hrossik went the extra mile by eliminating set<> and using binary search, and measuring the performance gain.

The winner is: hrossik.

82
General Discussion / Re: BitAssets 3.0 - For Community Review
« on: April 17, 2015, 02:36:03 pm »
This post is specifically addressing a portion of Arhag's proposal with multiple queues.  If I understand that proposal correctly, Arhag is essentially saying that "A settlement offer is the long requesting to trade their long for a certain amount of BTS.  Why don't we just let the system use the market to give the long what they are asking for, if someone in the market is willing to provide it?  That will give the settlement process a chance to be completely voluntary, and only resort to involuntary settlement when no one is willing to serve as a counterparty to the redeeming long holder."

The answer is that the 24-hour period between the filing and execution of the redemption request actually has a purpose that hasn't been mentioned in this thread as far as I can see.  There is no technical obstacle to processing redemption requests immediately.  However, such a scheme would suffer from a critical economic flaw:  The long is free to view the feed's data sources (external exchanges, etc.), and is able to react to changes in these external data sources much faster than the feed.

Thus, with instantaneous requests, a long holder would know (through their own observations of the external data sources used to produce the feed) that the settlement value of their long position is going to go down in the near future -- and then settle immediately, before the feed has a chance to update.

The delay period prevents this attack.  It forces the long holder to say "I'm going to redeem" without knowing exactly what the redemption price will be.

Which brings us to Arhag's system.  We can't match the long holder against a market order until we know the redemption price, and a fundamental feature of the system, which I included in the system because I believe is economically necessary for it to function, is that we don't know the redemption price until the redemption time.

83
General Discussion / Re: BitAssets 3.0 - For Community Review
« on: April 17, 2015, 02:18:23 pm »
the grace period gives certainty that the short position won't be called.

Shorters are big boys / big girls, they can handle it.  One of our underlying assumptions from before BitShares was even created, is that longs should be friendly to relatively unsophisticated market participants (guy who just wants an account with dollars he can use to buy coffee).  There is no such assumption about shorts.  Adding this grace period risks the security of the network -- protected shorts aren't providing liquidity to longs at the price feed (which is the entire point of having BitAssets in the first place, right?) and can get undercollateralized without being called.

when a short position is margin called, it does not automatically buy up BitUSD up to a price of 10% above the feed price in my proposed tweaks. Instead the price limit it is willing to cover at grows monotonically from the feed price all the way to 20% above the feed price as the collateral ratio continues to drop lower and closer to 100%.

This is actually a feature that's been in my mind as well -- instead of having a cliff, the premium should slowly go up as the value goes down.

For the first time the bitAsset holders will have the actual power to sell at about the feed price. It is significant (in my book) difference from the current model where the shorts have to cover at the peg and only as a consequence of that the longs can sell at the peg (in 30 days or less).

Yeah.  I've always been skeptical that the current BitAsset system would have a correctly functioning, tight peg in all market conditions, and experience hasn't really alleviated that skepticism.  Having a stronger redemption system increases my confidence, as sound economic theory says that if A is redeemable for B, then the price of B sets a floor for the price of A.  A price floor for BitUSD protects existing long holders.

Arhag, falls below 100% during redemption process?

This is impossible if you always call the lowest collateral shorts (we'll always improve the strength of the average short's books by settling the short with the weakest books).  With arhag's "grace period" scheme it is possible, however, if shorts protected by the grace period have worse-than-average books.

the short owner should be allowed to add and remove margin as they please

This simply doesn't work.  The whole point of collateral is that it's a "backstop" for the system that the shorts need to cover to liberate.  "Removable collateral" doesn't meet the definition of the word "collateral" which is "property used to guarantee a loan."  Collateral has to be only allowed to increase.  It's okay for a short to increase his collateral level because that increases the security of the system.  However, if a short wants to drop his collateral level, he needs to cover and re-short.

Also, you can view the assignment of a redemption request to the lowest short as having the short holders "bid" against each other in an "auction" which is "selling" the right to remain in the market when the long wants to settle.  Auction-style systems only work when bidding requires at least the winning bidder to sacrifice something of value (i.e. pay a price proportional to their bid).  Tying up their capital for a few minutes when the redemption is actually processed, is not requiring sacrifice of a very meaningful amount of value (there's an incentive to add a ton of collateral a few minutes before a redemption request is due to be processed, then pull out your collateral a few minutes after).  Tying up capital for an indefinite period of time (until covered or redeemed) is definitely a big enough sacrifice of value to be meaningful, tying up capital for a few minutes is not.

84
@me: hit me for not writing up half a page in time ..

You're not the only one.  I was busy actually writing code and I forgot about it...For the curious, https://github.com/BitShares/bitshares/commits/develop?author=theoreticalbts is a self-updating list of my latest contributions :)

85
I feel like there should be a link/button going to to bitsharesblocks.com on the bitshares.org frontpage.

There is.  It's called "block explorer" under "blockchain"

86
General Discussion / Re: Indexcoin White Paper - Hello Bitshares
« on: March 08, 2015, 04:11:31 pm »
Sounds like OP is asking for a new market pegged asset with feed price equal to a basket of various cryptocurrencies.

BitShares can indeed support this use case if delegates are willing to create a feed.

Presumably the percentages of the various altcoins used in the feed's computation will change as altcoins come and go.  There needs to be a well specified process for initially choosing these percentages and adjusting them over time.  And that's where things get political.

87
To elaborate why nLockTime is necessary to make the protocol atomic:  In your system, if Bob sends the Bitcoin transaction out near the end of the 24 hour window, such that it's unconfirmed when 24 hours has expired, the delegates may release escrowed BitBTC to Alice -- but Bob has no way to recall the transaction sending BTC since he already broadcast it to the Bitcoin network.  For that matter, it is possible Bob sent the transaction out at the beginning of the 24-hour window and no miner happened to include it (perhaps Bob's misconfigured Bitcoin wallet pays no fee or a very low fee).

The trick to making it truly atomic is for the escrow to do nothing until the coins have been sent somewhere.  This means the escrow will release Alice's BitBTC back to her if Bob spends the BTC on something else (and Bob forfeits his bond).  But there is still an obvious problem with that approach:  Bob could be malicious (or simply have an extended outage) and not spend the BTC for a long time (or even forever), keeping Alice's BitBTC locked in escrow until and unless he decides to spend them!  The way to fix the obvious problem is to give Alice a way to force the BTC to be sent back to Bob, which will trigger the "Bob spent the BTC on something else" logic.  So Alice won't put her BitBTC in escrow for an extended period until Bob's sent her a transaction which transfers Bob's BTC back to Bob himself.

Of course there is now another obvious problem:  If malicious, Alice might immediately broadcast the transaction sending the BTC back to Bob, triggering the "Bob spent the BTC on something else" logic and making Bob forfeit his bond!  To prevent this problem, you need to make sure the transaction sending the BTC back to Bob cannot be accepted by the Bitcoin network until some time has elapsed.  Which is exactly the purpose of nLockTime.

88

This algorithm sounds a lot like https://github.com/drltc/bitbond-proposal/blob/master/btc-trade.md which I brought up back in September.

Interesting... I had not seen that document before. As tonyk mentioned I was quoting myself. The proposals are extremely similar (although I don't understand why you need to complicate the Bitcoin transactions so much with redacted transactions and the nLockTime stuff).

Also, I think allowing the bids and asks to specify a bond percentage complicates the market too much (makes it 2-dimensional). I think it is better for everyone (simpler to understand matching rules) to just hard code it per market. Different markets with different hard coded percentages (in the market's definition) could exist however. But I think a market with a 10% bond is a pretty decent one that hopefully most people would use (so that the liquidity would be high in that market).

Your protocol is not atomic if the Bitcoin network is slow.  I've had transactions take a long time to get confirmed on Bitcoin (turned out because my fees were too low).  The parties have to agree on a txid because there might be multiple transactions between the same buyer and seller, e.g. if Alice puts up 5 offers of 1 BitBTC each, and Eve takes all 5 offers, unless you have some way of distinguishing the transactions, Eve's 1 BTC payment to faithfully settle the first transaction might result in BTS releasing the escrowed BitBTC for all 5 offers, resulting in Eve effectively buying 5 BitBTC for 1 BTC total instead of 1 BTC each.

But the txid alone is not sufficient.  Alice doesn't want to agree to a contract of the form, "release BitBTC to Bob if <txid> is confirmed on the Bitcoin network."  Rather to protect Alice the contract needs to say, "release BitBTC to Bob if <txid> is confirmed on the Bitcoin network and <txid> transfers 1 BTC to Alice (as well as possibly some side effects)."  In your system the delegates have to semantically interpret the Bitcoin transaction, they have to "recognize" that the transaction "means" 1 BTC is sent from Alice to Bob.  In your system, if Bob's using a Bitcoin wallet which does something unusual, resulting in the coins being transferred to Alice without triggering the recognition logic, Bob's SOL and Alice ends up with his BTC while keeping her BitBTC.

If both parties agree on the exact bytes of a proposed delivery transaction (as in my system), the protocol simply fails if Alice and Bob's wallets don't both recognize that the proposed delivery transaction will in fact deliver the BTC to Alice.  The reason the signature of the proposed delivery transaction must be withheld / redacted is to allow Bob to stop the transaction from being broadcast on the Bitcoin network if Alice doesn't agree.

89
General Discussion / Re: Should Bytemaster's Hangouts Continue? (POLL)
« on: February 27, 2015, 05:41:03 pm »
My personal preference would be to have an IRC session instead of Mumble.  For the good and simple reason that I can probably read an hour's worth of discussion in 10 minutes if it's text (or even faster if I don't try to fully read it but just look for key terms).  But if it's an hour of audio, there's no way I'll be able to get through it in less than an hour.

I'm well aware that the community loves the Mumble sessions and I'm just about the only person who feels this way...which makes it all the more important to throw my opinion out there.

90
General Discussion / Re: Should Bytemaster's Hangouts Continue? (POLL)
« on: February 27, 2015, 03:27:10 pm »
Personally, Nikolai is the only other dev I'm aware of on these forums. I came here because of Dan and heard about Nikolai (toast) early on. I've seen others mentioned, but don't recall ever seeing or realizing one of them has posted here. So, I'd like to hear from anyone other than Dan or Nikolai (since I already know what their mindset is currently). I'm sure that's already happened, but I missed it and would like an updated interview with someone. That's my 2 bitSilver.

bytemaster and toast are certainly our most prolific posters, but Vikram and I do hang around here and post fairly often too.

I haven't been posting very much here lately because I think there's more value in spending my BitShares time actually, you know, writing code :)

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 12 13 ... 34