Author Topic: Yield question  (Read 4792 times)

0 Members and 1 Guest are viewing this topic.

Offline hpenvy

  • Sr. Member
  • ****
  • Posts: 451
    • View Profile
There will be a separate bond market for guaranteed returns.

Do we have a spec for this yet?  Will this be a 1.0 feature?

Same question.
=============
btsx address: hpenvy
Tips appreciated for good work

Offline theoretical

There will be a separate bond market for guaranteed returns.

Do we have a spec for this yet?  Will this be a 1.0 feature?
BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline bytemaster

Yeah, I see that... fair enough. Not sure if there's a good way around it though. You can't have the short pay interest directly to the long because you'd end up with different classes of bitUSD, some with a high interest rate, some with low.

Right now yield is very difficult to quantify because its completely variable for everyone. At least with the short paying the long, you'd know up front exactly what you were getting.

True, you'd end up with bitUSD's receiving different interest rates, but on the limit wouldn't they all end up mixed together anyway?

There will be a separate bond market for guaranteed returns. 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline monsterer

Yeah, I see that... fair enough. Not sure if there's a good way around it though. You can't have the short pay interest directly to the long because you'd end up with different classes of bitUSD, some with a high interest rate, some with low.

Right now yield is very difficult to quantify because its completely variable for everyone. At least with the short paying the long, you'd know up front exactly what you were getting.

True, you'd end up with bitUSD's receiving different interest rates, but on the limit wouldn't they all end up mixed together anyway?
« Last Edit: December 08, 2014, 09:27:53 am by monsterer »
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

zerosum

  • Guest
...the way the yield is calculated currently...

Do you have a link (other info) for that?

This with these updates to it is the best I could find.

Define:
R(N) = Quantity of BitUSD in the yield pool as of block N
S(N) = Supply of BitUSD as of block N (not clear if this is total supply or only the supply that can collect yield)
T(N) = Timestamp of block N

Then, let's say you have a balance of B BitUSD at block M and then you want to move it to claim yield at block N > M. The yield Y on that balance would be calculated according to the formula:
Y = B * (R(N) /  S(N)) * ( 0.8 * (min((N-M), 3155673) / 3155673) + 0.2 * (min((N-M), 3155673) / 3155673)^2 )   if (N-M) >= 8640
or
Y = 0   if (N-M) < 8640


Let Y' = B * (R(N) / S(N))
and deltaT = T(N) - T(M)

Y = 0   if deltaT <= (1 day)
Y = Y'  if deltaT >= (1 year)
Y = Y' * ( 0.8 * (deltaT / 1 year) + 0.2 * (deltaT / 1 year)^2 )  if (1 day) < deltaT < (1 year)


Keep in mind the above is my interpretation of the linked posts. The devs would have to confirm if this is in fact representative of the actual code present in the current client.

Edit: Actually it appears the code deals with time directly and not block heights (I guess the timestamp that delegates include in the blocks are used as the trusted time source?).

Well, this formula reduces the yield in any case of  growth of the total bitAssets outstanding (from 5% to 3.12% for a very conservative 10% monthly growth (from 1 Mill to  2.853 Mil for the whole year) in the next year, in the total available bitUSD).  And as we expect/hope for massive growth in that area he should find probably some distribution schedule of those yields/interest (or alternatively, calculations from the 'origination point', but those seam more calculation expensive).
« Last Edit: December 08, 2014, 06:08:14 am by tonyk2 »

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
Drltc posted an excellent proposal to redesign the yield system a couple months back as well. The current system is pretty hacky, I'll heartily agree with that.

The current system straddles that fine line between crude and elegant.

Sent from my SCH-S720C using Tapatalk 2

Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

zerosum

  • Guest
...the way the yield is calculated currently...

Do you have a link (other info) for that?

This with these updates to it is the best I could find.

Define:
R(N) = Quantity of BitUSD in the yield pool as of block N
S(N) = Supply of BitUSD as of block N (not clear if this is total supply or only the supply that can collect yield)

Then, let's say you have a balance of B BitUSD at block M and then you want to move it to claim yield at block N > M. The yield Y on that balance would be calculated according to the formula:
Y = B * (R(N) /  S(N)) * ( 0.8 * (min((N-M), 3155673) / 3155673) + 0.2 * (min((N-M), 3155673) / 3155673)^2 )   if (N-M) >= 8640
or
Y = 0   if (N-M) < 8640


Keep in mind the above is my interpretation of the linked posts. The devs would have to confirm if this is in fact representative of the actual code present in the current client.

Thanks for the fast response! Those are the posts I recall, although I could not find them, myself.

I have several intertwined points -
1. The current system continues to heavily undervalue the collected yield ( or be to slow to distribute it, in my rough/feel estimate).
2. drltc Had a more concise post explaining exactly where this calculation goes wrong; One of the main points of it was to the effect that the system will always accumulate yield and will more or less try to keep 1y of non-distributable interest.
3.Some changes were made (will be made ?), due to his input, now that he works for I3 (And I have seen no written record for those changes)

Anyway, thanks for the fast and pointed response!

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
...the way the yield is calculated currently...

Do you have a link (other info) for that?

This with these updates to it is the best I could find.

Define:
R(N) = Quantity of BitUSD in the yield pool as of block N
S(N) = Supply of BitUSD as of block N (not clear if this is total supply or only the supply that can collect yield)
T(N) = Timestamp of block N

Then, let's say you have a balance of B BitUSD at block M and then you want to move it to claim yield at block N > M. The yield Y on that balance would be calculated according to the formula:
Y = B * (R(N) /  S(N)) * ( 0.8 * (min((N-M), 3155673) / 3155673) + 0.2 * (min((N-M), 3155673) / 3155673)^2 )   if (N-M) >= 8640
or
Y = 0   if (N-M) < 8640


Let Y' = B * (R(N) / S(N))
and deltaT = T(N) - T(M)

Y = 0   if deltaT <= (1 day)
Y = Y'  if deltaT >= (1 year)
Y = Y' * ( 0.8 * (deltaT / 1 year) + 0.2 * (deltaT / 1 year)^2 )  if (1 day) < deltaT < (1 year)


Keep in mind the above is my interpretation of the linked posts. The devs would have to confirm if this is in fact representative of the actual code present in the current client.

Edit: Actually it appears the code deals with time directly and not block heights (I guess the timestamp that delegates include in the blocks are used as the trusted time source?).
« Last Edit: December 08, 2014, 04:08:15 am by arhag »

zerosum

  • Guest
...the way the yield is calculated currently...

Do you have a link (other info) for that?

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
All interest paid by all shorts is shared by all USD equally.

What's to stop someone from taking both sides of the trade, shorting and buying into their own short, essentially entering into a 100% hedge which pays yield with no risk?

So if I understand what you are saying correctly, you are saying that any time there is an opportunity to match your own short (without eating up other people's BitUSD sells in the process) at 0% interest you should take it, since there is no downside possible. You just need to cover your own short with the BitUSD you hold before 30 days and you will not lose/gain any BTS due to price changes in BTS. However, you could potentially collect extra BitUSD at the end of this process because of yield earned on the BitUSD you held over the 30 day period.

Now, if you could only match your short at some positive interest rate, it is no longer a sure thing. You have to bet that the total yield you will receive over the N blocks (where N < 259200 = 30 days / 10 seconds) from when your short is matched until when you cover is greater than the total interest you need to pay over the same N blocks. The total interest you will pay while your matched short position exists, I(N), can be known prior to even submitting the short order (assuming your short does match). However, the yield you receive over the same period of time Y(N) is not possible to know exactly. You want to submit your short order and match it (assuming again you can match it without buying up other people's BitUSD sell orders in the process) if you believe I(N) < Y(N) for some N < 259200. If you are wrong about this, you will actually lose money.

The big problem with all of this comes from the way the yield is calculated currently. It is estimate the yield your BitUSD balance will get over 30 days with decent accuracy. While it is in theory possible that all other BitUSD balances will suddenly claim their yields before you do in the 30 day period, leaving you with very little yield left, you can safely assume that yield claims will be uniformly distributed throughout the year. That allows you to determine a very good estimate of Y(N) for 1 < N < 259200, and therefore decide whether it is worth it given the interest you would have to pay.

I do not think the solution to this is to destroy the fungibility of BitAssets. I think the solution is to have a better implementation of BitAsset yields. The yields for a BitAsset balance should always be known exactly (not estimated) and should be monotonically increasing (not necessarily strictly) over time. The order in which yields for BitUSD balances are claimed should not effect the yield of all other BitUSD balances (and same for all other BitAssets). Yields should be paid out of a yield pool. The amount of funds that move into the yield pool every block is enough to satisfy the target interest rate at that moment for all outstanding BitAssets (all BitAssets that are allowed to collect yield which does not include the BitAssets stored in the yield fund or the other reserve that feeds into the yield fund at the target rate). The target interest rate can change from block to block depending on the amount of BitAssets in the reserve pool compared to the amount of outstanding BitAssets that can collect yield, as well as other factors.

I believe an implementation of yield as described above not only makes yield more fair than the current system for BitAsset holders, but also makes it difficult for people to estimate Y(N), since it is hard to predict how the supply of BitAssets may change in the near future (existing shorts can be covered and new open short orders could be matched at any time) and how the market short interest rate will change in the near future (information from short interest changes should propagate very quickly to the target yield rate, meaning the DAC should collect short interest continuously and feed that into the reserve pool so that the target interest rate can adjust quickly based on that new information). So the attack you brought up (I hesitate to really even call it an attack) would become more of a gamble and thus not really an attack.
« Last Edit: December 08, 2014, 02:58:07 am by arhag »

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
You talk like you see a problem with a simultaneous long/short. In my view, this hurts nobody.

I don't think so. If you short to yourself with 0% interest rate, then you take money away from the system with 0 risk. All the other shorts contribute to your yield while you contribute nothing.

Yeah, I see that... fair enough. Not sure if there's a good way around it though. You can't have the short pay interest directly to the long because you'd end up with different classes of bitUSD, some with a high interest rate, some with low.

Sent from my SCH-S720C using Tapatalk 2

Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Offline monsterer

You talk like you see a problem with a simultaneous long/short. In my view, this hurts nobody.

I don't think so. If you short to yourself with 0% interest rate, then you take money away from the system with 0 risk. All the other shorts contribute to your yield while you contribute nothing.
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
it is not like - you could eat your own cake! in theory i assume you could make money if the short interest you pay is smaller as the yield you get. but the yield looks not so much in the moment to me. so, not much to gain.

Yes, like you say it depends on whether the yield you receive is more than the interest you pay. IMO it might have been cleaner to have the short pay the long directly (with yield) and have that expire when the short covers, then you truly gain nothing from this.

You talk like you see a problem with a simultaneous long/short. In my view, this hurts nobody. The only possible downside is that it artificially inflates the market cap of the asset, but maybe that's not a downside.

Disclaimer: I routinely short to myself when I can do so at a zero interest rate.

Sent from my SCH-S720C using Tapatalk 2

Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Offline monsterer

it is not like - you could eat your own cake! in theory i assume you could make money if the short interest you pay is smaller as the yield you get. but the yield looks not so much in the moment to me. so, not much to gain.

Yes, like you say it depends on whether the yield you receive is more than the interest you pay. IMO it might have been cleaner to have the short pay the long directly (with yield) and have that expire when the short covers, then you truly gain nothing from this.
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline Shentist

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 1601
    • View Profile
    • metaexchange
  • BitShares: shentist
All interest paid by all shorts is shared by all USD equally.

What's to stop someone from taking both sides of the trade, shorting and buying into their own short, essentially entering into a 100% hedge which pays yield with no risk?

it is not like - you could eat your own cake! in theory i assume you could make money if the short interest you pay is smaller as the yield you get. but the yield looks not so much in the moment to me. so, not much to gain.

- yield is difficult because bytemaster decided to pay to bitAsset holders more over time. it would easier to understand everything to redo it and pay for every day equal yield! at the moment it is for a normal user impossible to calculate the yield he gets. in my opinion this should be redone. it is not convenient at the moment.