Bitcoin Forum
November 16, 2024, 04:23:08 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Calculating Input / Output to Pay Investor £/% Based on Cunsumer BTC Buy.  (Read 384 times)
contemptx (OP)
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
July 12, 2017, 12:00:54 PM
 #1

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.
cr1776
Legendary
*
Offline Offline

Activity: 4228
Merit: 1313


View Profile
July 12, 2017, 03:56:24 PM
 #2

Sounds like you'd want a database of deposits and then track with have been "bought".
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4851



View Profile
July 12, 2017, 04:12:55 PM
 #3

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)
contemptx (OP)
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
July 12, 2017, 05:17:08 PM
 #4

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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!