Author Topic: What does the life of a bitAsset look like?  (Read 6484 times)

0 Members and 1 Guest are viewing this topic.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
No line numbers on phone, search "market_trx"

Sent from my SCH-I535 using Tapatalk

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Try searching for deterministic transactions, I realized the market algo would require them to match short/longs since it matches to maxinize tx fees. So this is where the bitusd output would be created claimable by the long position.

Sorry I do not have the exact code available, I did not write it only discussed it with bm.

Sent from my SCH-I535 using Tapatalk

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
As soon as the network lends it to you, it exists.
Still waiting on the exact code that *THE NETWORK* does that...
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
How s bitUSD created?
By someone going short bitUSD

Maybe that's technically correct, but it's a confusing way to say it.

BitUSD is created when someone borrows it from the bitshares network. Once you've borrowed it, you're free to sell it on the open market. You're not short bitUSD until you've sold the bitAssets that you've borrowed.

Sent from my SCH-S720C using Tapatalk 2

Correct, except that this is a single operation, "borrow and sell".   You cannot borrow without selling.

Can you someone, please, explain how you borrow something that does not exists????

As soon as the network lends it to you, it exists. :) that's what makes bitassets powerful: there is not a fixed supply. The network prints and destroys bitassets in proportion to the demand for them. It the supply were fixed, there would be no way for them to track real-world values.

Thanks for the clarification, bytemaster. I've always been a little fuzzy on implementation details.

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 tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
https://github.com/InvictusInnovations/BitShares/blob/master/src/blockchain/trx_validation_state.cpp

This is an old engine on the old repo and idk where the most recent is. But here in "validate long" you see the long position claiming his bitusd from one of the short's transaction outputs, which also includes the bts that the short can claim ("after the trade", aka the borrow + sell is atomic in one tx)

Sent from my SCH-I535 using Tapatalk

If the system created those bitWhateverAssets there must be some output (the very least and probably rules how and when to do its magic), from which the short get/borrows them from the 'network'... I was asking for this part of the code
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
As I understand it, it is at any time possible to change between on the one side non-liquid XTS you give up into non-liquidity and on the other side BitUSD you didn't have before. The system can always give you BitUSD when you give up XTS in liquid form. You can revert this at any time at current market rates.

You get to revert it at the old price in bitusd, which I guess is current market rate if you are thinking always in terms of bts

Sent from my SCH-I535 using Tapatalk

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
https://github.com/InvictusInnovations/BitShares/blob/master/src/blockchain/trx_validation_state.cpp

This is an old engine on the old repo and idk where the most recent is. But here in "validate long" you see the long position claiming his bitusd from one of the short's transaction outputs, which also includes the bts that the short can claim ("after the trade", aka the borrow + sell is atomic in one tx)

Sent from my SCH-I535 using Tapatalk

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline santaclause102

  • Hero Member
  • *****
  • Posts: 2486
    • View Profile
As I understand it, it is at any time possible to change between on the one side non-liquid XTS you give up into non-liquidity and on the other side BitUSD you didn't have before. The system can always give you BitUSD when you give up XTS in liquid form. You can revert this at any time at current market rates.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
When your short order is matched with a buy order the network atomically prints and lends "you" the bitusd and then trades it to the long usd position

Sent from my SCH-I535 using Tapatalk
Can somebody point my stupid sole to the exact line/s of code that make the 'network' do this magic ...
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
When your short order is matched with a buy order the network atomically prints and lends "you" the bitusd and then trades it to the long usd position

Sent from my SCH-I535 using Tapatalk

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
How s bitUSD created?
By someone going short bitUSD

Maybe that's technically correct, but it's a confusing way to say it.

BitUSD is created when someone borrows it from the bitshares network. Once you've borrowed it, you're free to sell it on the open market. You're not short bitUSD until you've sold the bitAssets that you've borrowed.

Sent from my SCH-S720C using Tapatalk 2

Correct, except that this is a single operation, "borrow and sell".   You cannot borrow without selling.

Can you someone, please, explain how you borrow something that does not exists????
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline muse-umum

  • Hero Member
  • *****
  • Posts: 717
  • BitShares everything
    • View Profile
How s bitUSD created?
By someone going short bitUSD

Maybe that's technically correct, but it's a confusing way to say it.

BitUSD is created when someone borrows it from the bitshares network. Once you've borrowed it, you're free to sell it on the open market. You're not short bitUSD until you've sold the bitAssets that you've borrowed.

Sent from my SCH-S720C using Tapatalk 2

Correct, except that this is a single operation, "borrow and sell".   You cannot borrow without selling.

still awake at 3am? take good care of yourself,don’t be the single point of faliure

 :D

Offline bytemaster

How s bitUSD created?
By someone going short bitUSD

Maybe that's technically correct, but it's a confusing way to say it.

BitUSD is created when someone borrows it from the bitshares network. Once you've borrowed it, you're free to sell it on the open market. You're not short bitUSD until you've sold the bitAssets that you've borrowed.

Sent from my SCH-S720C using Tapatalk 2

Correct, except that this is a single operation, "borrow and sell".   You cannot borrow without selling.
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 biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
How s bitUSD created?
By someone going short bitUSD

Maybe that's technically correct, but it's a confusing way to say it.

BitUSD is created when someone borrows it from the bitshares network. Once you've borrowed it, you're free to sell it on the open market. You're not short bitUSD until you've sold the bitAssets that you've borrowed.

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."