SPK - SPK DAO Funding and Updates

Words
412
Reading
2 min
5y
Listen to this post
~3 min

Status for March

Over 3000 accounts have claimed their March Tokens on the SPK Claim Chain. This includes quite a few of the largest accounts representing ~72M Hive and Hive Power. If you haven't claimed your tokens yet please go to spk.dlux.io or SPK Wallet @ dlux and claim before the end of the month UTC.

New UI Incoming

This presents a bit of a problem for the claim chain. The stated goals of establishing a DAO with the unclaimed tokens will upset the balance of power when more than 60% of the tokens are unclaimed. To that end we're only going to move around 15% of what has been claimed into our DAO account.

We put together some code that will claim a consensus determined (15% default) amount of claimed tokens and move them. There are also some new voting mechanisms for our node runners. Once more of the network is established this voting will move to the SPK token holders as it's planned to be the governance token for the SPK network. I'm in contact with just about all the node runners so if you want to set a higher or lower vote amount let me know; we are hard at work making UI for these changes though.

Speaking of UI. Both interfaces have been getting vast amount of development attention from psorigins@psorigins and markegiles@markegiles Check out the links above.

Technical Updates | Code Review

Now that most of the release fires have been extinguished we're hoping to do a more thoughtful review process for new features. Version 1.0.7 has the following changes.

1.0.7
  • Fixed release(txid) to wait for promises (order canceling)
  • Adust elmerlin balance by 9566.250 for release error in block 63014889
  • Adjust MSHeld Balance by 56 HIVE due to 1.0.4 errors
  • Added a non-claim to DAO routine
  • Added voting for DAO routine
  • Fixed Account Update
  • Added partial fill tracking on buy orders

New UI Incomming

Release - order cancel routine
  • /processing_routes/dex.js
    • dex_clear removed for loop with promise stacking
non-claim dao funding
  • /processing_routes/send.js
    newClaim = 0
            if(dao.m != json.timestamp.split('-')[1] && (json.timestamp.split('-')[0] == '2022' || json.timestamp.split('-')[0] == '2023') && parseInt(json.timestamp.split('-')[1]) < 4){
                dao.m = json.timestamp.split('-')[1] //set month
                newClaim = parseInt((supply - dao.ct) * (dao.v/10000))//only distribute based on new supply
                dao[json.timestamp.split('-')[1]] = newClaim //set claim reciept by month
                dao.t += newClaim //add to total
                dao.ct = supply + newClaim //track the current supply so new tokens only get issued off claims
                ops.push({ type: 'put', path: ['balances', 'rd'], data: parseInt(rdbal + newClaim) }); //dao account
                ops.push({ type: 'put', path: ['stats', 'daoclaim'], data: dao }); //this obect
                ops.push({ type: 'put', path: ['stats', 'tokenSupply'], data: supply + newClaim }); //update supply
            }
// mints new tokens on the first claim of each additional month
if(!newClaim)ops.push({ type: 'put', path: ['stats', 'tokenSupply'], data: parseInt(supply + trak.s) });
                    else {
                        ops.pop()
                        ops.push({ type: 'put', path: ['stats', 'tokenSupply'], data: parseInt(supply + trak.s + newClaim) }); //update supply with new claim
                    }
// further adjusts token supply if the claim op was a success
Voting
  • /processing_routes/nodes.js
var dv = parseInt(json.ds) || 0 //dao vote 10000 = 100.00% / 1 = 0.01%
        //the portion of the claim that will be put into the chains DAO. Recommend 10-15%
        if (dv < 0) {
            dv = 1500
        }
        if (dv > 10000) {
            dv = 1500
        }
// already finding the issue here: json.ds should be json.dv

Votes get counted here:

  • /dao.js
var newOwners = {}, dexfeea = 0, dexfeed = 1, dexmaxa = 0, dexslopea = 0, dexmaxd = 1, dexsloped = 1, dva = 0, dvd = 1
            if(j){
                for (var node in mnode) { //and pay them
                    ...
                    const gbal = gov[node] || 0
                    ...
                    const dvvote = typeof mnode[node].dv != 'number' ? 1500 : mnode[node].dv
                    ...
                    dva += parseInt(wins * gbal * dvvote);
                    dvd += parseInt(wins * gbal * 10000);
                    ...
                    }
                }
            }
            ...
            stats.daoclaim.v = parseInt(dva / dvd); //stored here
Partials Tracking
  • /processing_rooutes/dex.js
                var partial = {
                                coin: thistarget,
                                token: remaining + thisfee
                            }
                            if(next.partial){
                                next.partial[`${json.transaction_id}`] = partial
                            } else {
                                next.partial = {
                                    [`${json.transaction_id}`]: partial
                                }
                            }
Account Update

Wasn't pointing to the correct transaction signer. This has been worked with several minor fixes. During testing this seemed to work, but live has had slightly less than phenomenal results. Any updates here will include the above ds => dv fix in version 1.0.8 but I expect at least a day to work through this.

SPK - SPK DAO Funding and Updates | Ecency