BitShares Forum

Main => Technical Support => Topic started by: fav on October 23, 2015, 08:08:51 pm

Title: Affiliate system working on Blockchain level. Tested and Proven
Post by: fav on October 23, 2015, 08:08:51 pm
Since I'm already wasting my resources/money for nothing:

alright, I run a little giveaway for my referrals, naturally some are dumping their coins, and I decided to check on my vesting balance. And guess what? It's not vesting.

so I decided to give it a try with my demo account BLOCK #289321 bts-mytest to fav

(http://i.imgur.com/PqBqrHI.png)

unfortunately, 40% of that never reached fav.
Title: Re: Affiliate system working on Blockchain level. nope.
Post by: DestBest on October 23, 2015, 08:15:56 pm
What referral link did you use? Play's one?
Title: Re: Affiliate system working on Blockchain level. nope.
Post by: fav on October 23, 2015, 08:17:38 pm
What referral link did you use? Play's one?

yes, but it doesn't matter since it's recorded on the chain
Title: Re: Affiliate system working on Blockchain level. nope.
Post by: bytemaster on October 23, 2015, 08:58:00 pm
locked >>> get_account fav
get_account fav
{
  "id": "1.2.21106",
  "membership_expiration_date": "1969-12-31T23:59:59",
  "registrar": "1.2.21106",
  "referrer": "1.2.21106",
  "lifetime_referrer": "1.2.21106",
  "network_fee_percentage": 2000,
  "lifetime_referrer_fee_percentage": 8000,
  "referrer_rewards_percentage": 0,
  "name": "fav",
  "blacklisted_accounts": [],
  "cashback_vb": "1.13.52"
}

locked >>> get_object 1.13.52
get_object 1.13.52
[{
    "id": "1.13.52",
    "owner": "1.2.21106",
    "balance": {
      "amount": 37979072,
      "asset_id": "1.3.0"
    },
    "policy": [
      1,{
        "vesting_seconds": 7776000,
        "start_claim": "1970-01-01T00:00:00",
        "coin_seconds_earned": "295325263872000",
        "coin_seconds_earned_last_update": "2015-10-23T20:00:00"
      }
    ]
  }
]

It looks like the blockchain has you down for 379.79072 BTS in referral income.

The GUI is just not displaying this Vesting Balance Object and instead only shows you PENDING cashback which is where things accumulate until the next maintenance interval at which point in time the cashback_vb is updated.   

The calculations for doing the division of fees combined with rounding errors associated with dividing up small fees meant it was more efficient to accumulate and they payout than to pay as we go.
Title: Re: Affiliate system working on Blockchain level. nope.
Post by: boombastic on October 23, 2015, 09:02:20 pm
don't worry fav, it think it's just a UI thing, not properly displaying it.  You can use cli_wallet to check your vesting balance

Code: [Select]
get_vesting_balances fav
they should be there
Title: Re: Affiliate system working on Blockchain level. Tested and Proven
Post by: Riverhead on October 23, 2015, 09:04:42 pm

Cashback balances are vesting objects. Check the balances like you do your witness vesting balances.
Title: Re: Affiliate system working on Blockchain level. Tested and Proven
Post by: fav on October 23, 2015, 09:13:32 pm
ahh, thanks for your help!

edit: but that's not right either. 379 should be the remaining fees for my personal TXs?
Title: Re: Affiliate system working on Blockchain level. Tested and Proven
Post by: fav on October 23, 2015, 09:21:37 pm
just did another TX.

from: bts-mytest
to fav

in 40min, there should be any number higher than  37979072
Title: Re: Affiliate system working on Blockchain level. Tested and Proven
Post by: Akado on October 23, 2015, 09:31:12 pm
So everyone can start referring people now?  :D
Title: Re: Affiliate system working on Blockchain level. Tested and Proven
Post by: ElMato on October 23, 2015, 09:33:38 pm
Is this correct?

Every time a user that I refereed make a transfer, i will see in my account_statistics modified
(pending_fees / pending_vested_fees)?

And in the next maintenance interval those amounts are added to my cashback_vb object?
Title: Re: Affiliate system working on Blockchain level. Tested and Proven
Post by: bytemaster on October 23, 2015, 09:53:36 pm
Is this correct?

Every time a user that I refereed make a transfer, i will see in my account_statistics modified
(pending_fees / pending_vested_fees)?

And in the next maintenance interval those amounts are added to my cashback_vb object?

Yes
Title: Re: Affiliate system working on Blockchain level. Tested and Proven
Post by: clayop on October 23, 2015, 10:00:18 pm
Code: [Select]
get_vesting_balances 1.13.52
[{
    "id": "1.13.52",
    "owner": "1.2.21106",
    "balance": {
      "amount": 39237156,
      "asset_id": "1.3.0"
    },
    "policy": [
      1,{
        "vesting_seconds": 7776000,
        "start_claim": "1970-01-01T00:00:00",
        "coin_seconds_earned": "305108125056000",
        "coin_seconds_earned_last_update": "2015-10-23T22:00:00"
      }
    ],
    "allowed_withdraw": {
      "amount": 39237156,
      "asset_id": "1.3.0"
    },
    "allowed_withdraw_time": "2015-10-23T22:00:00"
  }
Title: Re: Affiliate system working on Blockchain level. Tested and Proven
Post by: fav on October 23, 2015, 10:01:14 pm
just did another TX.

from: bts-mytest
to fav

in 40min, there should be any number higher than  37979072

    "amount": 39237156,

confirmed, works! just not displayed in the gui
Title: Re: Affiliate system working on Blockchain level. Tested and Proven
Post by: Tuck Fheman on October 23, 2015, 10:28:20 pm
naturally some are dumping their coins

Same here. If they notify you they're dumping take advantage of it. ;)