Blockchain has been widely recognized as the trust machine underpinning the Internet of Things(IoT). However, the poor performance of the existing mainstream platforms renders this expectation unattainable. New technologies like DAG and Hashgraph emerge as promising candidates to address the pressing issues, but their abilities in decentralized consensus are still in question. We propose a 3D-DAG model to address the trilemma of decentralization, scalability and security. Experiment results show that, by adopting the separation of concerns(SOC) architectural principle and a software defined chain(SDC) approach, 3D-DAG can meet challenging requirements expected by IoT applications.