Digix Core Dev Update News

  • Digix (DGX)  2.0 Token Now LIVE on Testnet!

  • Digix Update — Mar 17th 2017


    KC Chng (CEO)

    Code Review and DigixDAO ETC Proposal There would be a couple more redeployments and refactoring of our contracts internally on the Kovan testnet prior to submission to smart contract auditors for review. In the meantime, we are currently sourcing for 1 to 2 Ethereum Smart Contract auditors to review our code. In lieu of time needed to request and negotiate for the availability of appropriate Ethereum Smart Contract auditor/s, we will simultaneously take the time to begin a refund proposal of the ETC within DigixDAO. The audit process, as highlighted in our roadmap, could take upwards of 45 working days, and depending on any major bugs or issues found, could either be shorter or longer than estimated. We will keep everyone posted as we move along. As the code is being reviewed, we will also be making optimizations to our front end and UI concurrently. A bit of background as to why there is ETC in DigixDAO, the Ethereum chain underwent a “hard fork” on July 20th 2015 (at block 1,920,000), which unintentionally caused a “chain split”, and spawned the alternative parallel chain “Ethereum Classic”. As a result of this split, all balances existing before the hard fork remained on both chains, and as of March 2016, the DigixDAO balance consists of 465,134 of Classic Ether (ETC) The ETC Withdrawal proposal V1.0 will be released this Wednesday for comment. Digix and Consensys Presentation next week: Mar 21 2017 Chris Hitchcott will speak on Digix’s tech stack (which includes Truffle, an Ethereum Development Framework by Consensys). Andrew Keys will also present a keynote special on Consensys and the Enterprise Ethereum Alliance. This will be live-streamed at the SGInnovate offices where we are working out of. For those in Singapore, please sign up for the event at https://www.meetup.com/Ethereu... Dev Update Anthony Eufemio (CTO) I have added functionality for assets to be added to different collections via a Doubly Linked List. This is required for the asset system user experience which will allow us to list assets for specified use cases. This includes listing the custodian delivery queue, listing of assets that have been minted and are part of the gold token pool, listing of assets that have failed the quarterly audit checks, listing of assets that are in the customer redemption queue, as well as every user’s owned assets. I have refactored the contracts so that moving them from one list to another depending on their status is done atomically which takes a significant amount of time as certain considerations have to be made including gas utilization (i.e. preventing gas exhaustion type attacks for non-atomic operations), preventing race conditions, and other security related precautions. We’ve also changed the primary identifier for Assets from an unsigned integer into an address type to allow users to directly interact with each asset as if there were individual contracts with its own ABI without having to go through the AssetUserInterface. We’ve also been moving some of our infrastructure services out of DigitalOcean and into Microsoft Azure under the Microsoft BizSpark Plus program. As Azure newbies we’re trying to learn the how to properly configure our Azure instances for best performance and security, as well as writing automation tools for provisioning new hosts as needed. Chris Hitchcott (Digix Core Dev) This week I’ve been working mostly on implementing the UI for Vendor and Custodian “backoffice” system for registering, accepting and redeeming PoA assets. The associated Smart Contracts were created by Anthony, and I deployed them to Kovan for UI testing. The UI uses the Spectrum environment, which allowed for a developer-friendly easy experience even with the (somewhat) complicated workflow. The “Digix Assets” dapplet is a standalone module that inherits all the benefits of Spectrum’s existing infrastructure. One of the interesting patterns implemented by Anthony in the Proof of Asset (PoA) smart contract system is that of a “Doubly Linked List” — it allows for infinite recursion of a collection by recording their neighbour IDs. In terms of creating a UI, it means calling a contract method to get the next or previous item in a given list, then calling the next item to get the next item, and so on. By leveraging the existing web3-redux implementation and combining it with the react component architecture, this allowed me to create a generic “DLL Paginator” component (which is now part of Spectrum core), that can be re-used throughout the Digix suite. It handles the logic for fetching items (based on passed async methods), and showing UI for pagination.

    AssetList component, passing in contract methods to get the items from DLL

    I also took advantage of Spectrum’s transaction signing system, which allowed me to register specific UI components to display users alongside account-specific components for signing transactions (e.g. a password input for encrypted keystores, QR code for cold storage, or message for hardware wallets), and passing generic data to it via web3-redux.

    Passing UI data to web3-redux to be shown in the hooked transaction signing modal

    The whole point of creating this UI is to make it super easy for each party (be it vendor, custodian or auditor) in the PoA system to be able to make transactions securely and conveniently. I’m told that one of the pain-points during the beta version was having to educate these users on how to interact with the contracts — hopefully having a simple and straightforward interface like the one created help will make it more intuitive.

    I also put together a little video update showcasing the process:

    endor and Custodian User Interface

    Also, shoutout to Tim from the Truffle team for having us up on http://truffleframework.com/. I cannot recommend Truffle enough, and it’s been solidly deploying (and importing via npm) the Digix contract system to Kovan (and will continue to for mainnet).

    Weekly dev commits


    [email protected]:DigixGlobal/cacp-contracts.git

    • 1c2d24f — [feature] expose is_owner() function in ACOwned


    [email protected]:DigixGlobal/core2-storage-library-contracts.git

    • 2dd73ca — [maint] bump version, redeploy
    • 0c7923b — Merge branch ‘master’ of github.com:DigixGlobal/core2-storage-library-contracts
    • e8c4b52 — [feature] AssetCustodianInterface getter functions
    • fce0e9a — [maint] bump version to 0.0.4
    • a0eb101 — [maint] deploy to kovan
    • 3e853a2 — [maint] update readme to include asset interface documentation
    • d659318 — [feature] Asset storage payment days
    • 61f1579 — [feature] Custodian interface
    • c17c363 — [maint] bump verison
    • 380d0b3 — [maint] re-deploy to kovan
    • aadf0e6 — [maint] update @digix/truffle-lightwallet-provider
    • 3123af2 — [hotfix] Fix custodian queue asset listing
    • 43015b4 — [wip] intermittent issues with contracts not being deployed.
    • fce9d6d — [maint] remove superfluous List library (use DoublyLinkedList)
    • 319fb94 — [feature] change asset ID to address type
    • 2c24dbf — [feature] use updated cacp that exposes is_owner()


    [email protected]:DigixGlobal/digix.io-v2.git

    • 0592138 — [maint] rebuild
    • b411da5 — [maint] fix build
    • a20acf1 — [maint] use new version
    • c4bf186 — [maint] use new version


    [email protected]:DigixGlobal/solidity-boilerplate.git

    • 7294eae — [maint] update deps


    [email protected]:DigixGlobal/Spectrum.git

    • 7fb7812 — [wip] custodian ui, butter-up all existing transaction modal UI
    • 0b0107d — [wip] custom signing UI; beautiful transactions!
    • 1516a5a — [wip] implement new getDefaultAddress, for nicer DX
    • a1ce59b — [bugfix] pass required props to assetList children
    • 7598ee2 — [wip] weights dropdown
    • e70192c — [wip] use updated contracts, modularised interfaces, UI enhancements
    • 32f5b83 — [wip] misc cleanup for release
    • d074948 — [wip] [minor] add react key in dll list, cleanup
    • 14af6f2 — [wip] implement double-linked-list paginator for assets
    • 8fc2a2e — [wip] refactor keystoreModal process; use session model, fix modal scrolling
    • acf631f — [wip] new/all toggle UI
    • 93feee7 — [wip] DefaultAddressSelector — don’t show the list if there are no addresses
    • 39d36ee — [maint] update version of asset contracts
    • 9414956 — [wip] prefix session store
    • 258d27d — [wip] major ORM update; session defaultAddress, addresses now fk, not many, (Default)AddressSelector
    • 591a470 — [maint] subprovider back to application/json
    • 682347f — [bugifx] resolve syncronous actions in keystoreModal
    • 0059917 — [wip] delete asset transactions
    • 970e513 — [wip] txData UI tweak
    • 6f89ce6 — [feature] transaction modal onClose event
    • 733a264 — [wip] IPFS image upload & viewing
    • 47b49af — [wip] misc stringUtils; (parseBigNumber format, parseHex)
    • 2f4b71f — [wip] use gram weight instead of nanograms in UI
    • 536c85e — [wip] basic pagination for assets interface
    • b52b481 — [wip] import v3 wallets
    • 3e26101 — Merge branch ‘refactor’ into feature/keystore-import
    • f31859f — [wip] use generic signing modal for digix assets
    • 56a6ab3 — [wip] use generic signing modal with tokens
    • 5469769 — [feature] generic transaction signing modal


    [email protected]:DigixGlobal/truffle-lightwallet-provider.git

    • 89da6eb — [feature] add pollingInterval


    https:[email protected]/DigixGlobal/web3-redux.git

    • 1d7a4da — [bugfix] manually check for bigNumber
    • b809484 — [maint] clean up console.log
    • 52e27de — [feature] add getDefaultAddress for decorating from field


    https:[email protected]/hitchcott/sui-react-ezmodal.git

    • a87e834 — [bugfix] render error.message if it’s available, rather than [object Object]
    • 2e37e4e — [bugfix] multiple scrolling modals
    • 7556119 — [bugfix] trigger onClose on success
    • a9526da — [feature] initiallyOpen; child passed setError, setLoading

  • Ethereum Singapore Meetup - Digix presenting Truffle, Enterprise Ethereum Alliance 

  • DigixDAO ETC Withdrawal Proposal V1.0 - Mar 22 2017


    As DigixDAO raised funds before the Ethereum hard fork, it holds an equal balance of 465,134 ETH and ETC. Digix wishes to create a withdrawal system that allows DGD holders (on the ETH chain) to withdraw ETC from DigixDAO, proportional to their token balance.

    As DGDs on the ETC chain are not honored by DigixDAO, a process (similar to the “whitehat” withdrawal contract) is proposed, which will be used to allow DGD holders on the main chain to:

    • Vote on whether the proposed solution should be accepted
    • Submit an address to receive their ETC proportion (to prevent replay attacks)
    • Should the vote pass, receive ETC proportional to their DGD holdings

    We are releasing this proposal for public discussion and feedback, with development to begin only whilst third party auditors are reviewing the DGX 2.0 core contracts, which remains our main priority.


    In March 2015 DigixDAO raised 465,134 Ether (valued at the time, at 5.5m USD) in return for a distribution of 2 million DGD tokens. In response to an unrelated security incident (“TheDAO Hack”), the Ethereum chain underwent a “hard fork” on July 20th 2015 (at block 1,920,000), which unintentionally caused a “chain split”, and spawned the alternative parallel chain “Ethereum Classic”. As a result of this split, all balances existing before the hard fork remained on both chains, and as of March 2016 the DigixDAO crowdfund balance consists of 465,134 in both Ether (ETH) and Classic Ether (ETC).

    Due to already-exploited “replay attack” concerns, DigixGlobal announced before (link) the hard fork that DGD tokens will reside on the main chain that is supported by the Ethereum Foundation, and as such, balances of “DGD Classic” became (and still are) valueless.

    This meant that the ETC balances are not directly related to DigixDAO governance proposals. However, the same mechanism that allows DigixGlobal to transfer the crowdsale balance into the Digix Governance contracts (once they are published) could allow for the balance of ETC to be transferred into another custom contract (such as a multisig wallet or withdrawal contract), which would then allow the ETC blance to be withdrawn safely.

    Without on-chain governance tools available at the time of the hard fork, Digix could not receive a clear mandate from DGD holders on the moving of ETC funds, and both the ETC and ETH funds have remained in the Digix crowdsale contract. Ever since, much community discussion have occurred and there appears to be a general consensus among DGD holders that action should be taken on the additional ETC balance as a priority.

    A security mechanism was built in to the original crowdfund contract for unforeseen situations such as a hard fork, which allows DigixGlobal to withdraw the crowdfund in the case of emergency. This mechanism can be used on the to withdraw the ETC.

    Utilising ETC

    After discussion internally and within the DGD holder community, there is a number of potential options for utilising the ETC:

    1. “Burning” (or leaving the ETC in the abandoned “Classic Crowdfund” contract forever)
    2. Using the ETC in the same way DigixDAO would ETH by:
    • Trading the ETC into ETH and adding to the DigixDAO ETH pool
    • Trading into DGX, DGD or other Crypto assets and transferring ownership to DigixDAO

    3. Refunding ETC to DGD holders

    Option one (1) was quickly ruled out as a waste of contributed funds.

    Option two (2) presents problematic operational complications and legal obligations to DigixGlobal at this early stage, including:

    • The process of directly selling the ETC on exchanges for ETH (opening up the possibility of frontrunning accusations) and/or
    • Time needed to source an OTC buyer who is willing to publish the transaction record and entering into a contractual agreement at a defined price which could lead to further mispricing accusations
    • Taking a legal custodial role in the trading and re-distribution process
    • Seeking and financing legal advice on the above overall process in Singaporean jurisdiction

    If DigixGlobal either directly or indirectly took the role of trading ETC into any other asset, it would present significant financial and legal difficulties reduces the separation between DigixGlobal and DigixDAO, as well as present complications regarding fairness of the trade(s) being made. Ultimately, this would burden operations and potentially put the entire Digix project at risk at this nascent stage.

    The Proposal

    In light of the above difficulties, an option was needed that absolved DigixGlobal of any direct role in the trading of ETC. Option three (3), to allow DGD holders to reclaim the ETC, is the only remaining approach, and has past precedent (happening similarly with “The DAO withdraw contract” and subsequent “whitehat” withdraw contract).

    In the spirit of DigixDAO and to preserve a legal compartmentalisation, DGD holders must be able to “vote”, in order for DigixGlobal to receive a mandate on the actions taken to transfer the ETC funds to various parties. In practice, this means that any voting or withdraw contract should have a “no” vote option, whereby the proposal is vetoed and no immediate action is taken in the case that a majority of voters (based on DGD balance) vote “no” (and a revised proposal is created at a later stage).

    As the DigixDAO governance model (including Smart Contracts deployed on the main chain for voting) is not yet available, an alternative is presented that utilises components of:

    • On-chain Voting Contract
    • A “CarbonVote” to reduce complexity of locking DGDs
    • Manual withdrawal processing
    • Withdrawal contract on ETC chain (perpetually available for non-voters)


    Given that the outcome of this vote will not hook-in with the DigixDAO governance model (as ETC cannot be directly controlled by the ETH DigixDAO), a less complex and more convenient mechanism is proposed for tallying votes.

    Inspired by http://carbonvote.com/, a “CarbonVote” system is proposed. CarbonVote was used in the past by the Ethereum Foundation to determine the default behaviour of the Geth client during the decision making process of the hard-fork.

    It is proposed that a similar CarbonVote system is set up by DigixGlobal to facilitate the decision making process for the ETC withdraw, allowing for DGD holders to simply and atomically send a zero-value transaction to an on-chain voting contract without sending their entire DGD balance. On the “closing block”, an off-chain ‘snapshot’ of votes will be tallied up based on the DGD balance of the voters on that block (thereby preventing double spends), with each DGD being each worth one vote. This tally is verifiable by third parties, and a CSV tally of votes will be published to IPFS.

    This proposed solution is the best balance of convenience, security and simplicity, whilst removing the risk of the vote process being “hacked” (as DigixGlobal will simply ignore the results should any unforeseen exploits be used in the voting mechanism).

    Some additional specifics:

    • Those who participate in the voting process regardless of “yes” or “no” vote, will receive ETC to the provided ETC address should the vote pass as “yes”.
    • To prevent spam, a minimum amount of 1 ETC (4.4 DGD) per account will be considered as a “valid vote” at the “closing block”.
    • Gas fees will be paid by the recipient account on the ETC chain and deducted from the withdrawal payment.
    • In the interests of fairness, the batched “refund” transactions (the transactions made to transfer the reclaimed ETC to voter’s addresses) will be created and published in batches in a random order, the seed of which will be generated on the block hash of the “closing block”


    • Open sourced voting Smart Contract with one method (deployed to ETH chain):  vote(bool _approve, address _etcAddress);
    • UI for voting & displaying vote results
    • Instructions for voting with Mist / Parity / MyEtherWallet / LedgerNano
    • Open source script for taking the ‘snapshot’ of the “closing block” and tallying votes
    • Open source script using the block hash of the “close block” for randomised sorting of refund transactions
    • Withdrawal contract on ETC chain for unclaimed funds (to be developed at a later stage if the vote passes)

    Unclaimed Funds

    After the initial refund process, there is a high likelihood that a portion of DGD holders will have not participated — either because they have forgotten about their DGD balance, are dis-engaged with the ecosystem, have too small a balance to consider it worthwhile engaging in the voting process (although this may change should the price of ETC increase), or simply didn’t have time to participate in the original main-chain refund process. The result is that some proportion of the ETC will inevitably remain unclaimed.

    There are 3 options as to what happens to this unclaimed ETC:

    1. The remaining balance is divided up proportionally to the participating voters
    2. The remaining balance is given to DigixGlobal
    3. A post-vote withdrawal contract is published on the ETC chain to allow non-participants to reclaim ETC for perpetuity

    Options one (1) would and two (2) use up all the remaining ETC at the end of the voting process, but as some proportion of DGD holders may not participate, it would be seen as unfair and present legal / political issues. Therefore option three (3) is the only reasonable course of action.

    Option three (3), whilst less convenient to participate in than the initial vote (and requires publishing transactions on the ETC chain from the same account as the ETH chain), would provide a perpetual pathway for non-participating DGD holders to claim their proportion of the remaining ETC.

    This contract would be developed and deployed only if the vote passes, the specifics of which will be confirmed at a later date, but will most likely be in the form an EIP20 “Redeem Token”, which would be added to the balance of the non-participating voters on the ETC chain. This token would be transferable (to allow users to avoid replay attacks), and have the option of being “burned” (to prevent double spends); thereby returning an ETC balance proportional to the tokens that are burned. Costs associated with deploying and setting up the ledger for this contract (gas fees), will be deducted from this withdraw contract’s balance.

    Instructions on how to perform this withdrawal safely will be published, but no commitments in terms of developing a dedicated UI will be made by DigixGlobal.


    There will be several milestones throughout the process of this withdrawal proposal process

    1. A period for community to discuss and critique this proposal
    2. Only after the completion of the DGX 2.0 contract system ( whilst they are being audited by third parties), and depending on the outcome of the discussions, a to-be-determined period for the development of the contracts and UI required for the voting process
    3. The voting window itself (a period of one month is proposed, with one week’s notice before it begins)
    4. Should the voting pass, an additional two weeks for the votes to be tallied, verified and for the withdrawal processing script to be initiated
    5. A short period for the processing of withdrawal transactions (in random order)
    6. A-to-be determined amount of time for the implementation of the non-participant withdrawal contract (on ETC chain).

    This particular voting proposal is important and significant for DigixDAO as it is a precursor to governance and voting when DigixDAO governance contracts are deployed. It will allow all DGD holders to publicly ‘beta test’ and gain valuable insights on DGD voting, interest and participation in the near future. In short, we will be able to use this current, low risk proposal to better enhance and improve upon our DigixDAO governance model.

    The development of this system could also be utilised in future for similar (or emergency) decision making votes, and importantly does not require the transfer of DGD for participation, yet still accurately reflects the decision making of DGD holders.

    Voting via DGD listed Exchanges

    We will be reaching out to centralized DGD listed exchanges (Bittrex, Yunbi and Gatecoin) to improve the efficiency of voting on this proposal.

    • Yunbi is on board with facilitating the refund process by taking a snapshot of their balance sheet in line with with the withdrawal contract (TBC if they will provide an option for their users vote)
    • Bittrex tbc
    • Gatecoin tbc

    As DigixGlobal is independently ran with these exchanges, we can only propose that they provide a simple UI to perform voting on their platform or automatically crediting ETC balances of DGD holders based on a timestamp, so that users who store DGDs on DGD related exchanges do not need to withdraw their tokens to participate in the voting process. We cannot guarantee that they will adopt this approach at this moment and will make further public announcements if and when they do so.

    DigixDAO Crowdsale address

    By refunding the ETC, DigixGlobal will need to take security measures to protect the ETH currently within the DigixDAO crowdsale address. The private keys for this particular address will have to move out of cold storage and for the very first time be online to refund the ETC (as it shares the same address as the ETH), hence, a security precaution is needed where it is necessary for the ETH funds to be moved into a new crowdsale address. The new crowdsale address will be posted, published, and updated on Etherscan to replace the current DigixDAO crowdsale address.

    PDF Version athttps://www.digix.io/docs/Digi...

Log in to reply

Looks like your connection to Cryptocentral was lost, please wait while we try to reconnect.