Author

Topic: Calculating Input / Output to Pay Investor £/% Based on Cunsumer BTC Buy. (Read 385 times)

member
Activity: 76
Merit: 10
After talking this with the developers they have also confirmed that they only way to do this would be offchain,
I wanted to check before going head on with the development to implement a structure to be able to do this Wink

More to be revealed soon! :p
legendary
Activity: 3472
Merit: 4801
I'd handle that by implementing an order book.  That way you can do it on both sides (BTC provided, and BTC taken).
https://en.wikipedia.org/wiki/Order_book_(trading)
legendary
Activity: 4228
Merit: 1313
Sounds like you'd want a database of deposits and then track with have been "bought".
member
Activity: 76
Merit: 10
Hopefully someone gets the gist of the idea and can shed some light on if something like this is possible Wink

Example:

1st: Investor A sends 1BTC to address xxx
2nd: Investor B sends 1BTC to same address xxx
3rd: Investor A send another 1BTC to same address xxx

Customer Buys 2.5BTC from address

How could we track so that the bitcoin used would be from investor A & B first (as those deposits happened first) and then 0.5BTC from Investor A again to supply the customer's bitcoin.

So first deposit is used first if that makes sense?
In short we want to track input / output so we can payout the correct amount / % to the investor... (we want to automate this & not have to run reports manually)

If this is not possible then another solution we are considering is that

Investor A sends 0.70BTC
Investor B send 0.30BTC

= 100%

Customer Buys 0.20BTC = (20%)

Investor A gets (70% of sale)
Investor B gets (30% of sale)

Because the % would be based on how many investors + how much BTC + how much BTC is sold.
Jump to: