Upgrade to Pro — share decks privately, control downloads, hide ads and more …

dEXonation

Jeremy Yen
December 16, 2018

 dEXonation

DEXON Hackathon Team #15

Jeremy Yen

December 16, 2018
Tweet

More Decks by Jeremy Yen

Other Decks in Technology

Transcript

  1. Our Team #15 Viktor Lin Jeremy Yen Alex Tzeng JavaScript

    Developer JavaScript Developer Alvin Hou Blockchain Developer Team Leader
  2. Viewer’s Browser (DukuSan) Streamer’s Wallet Show Notification in Streaming dEXonation

    Smart Contract event NewDonation( uint value, string donor, string message, address raddr ); donate( address _receiver, string _name, string _message ) Transfer DXN WebSocket
  3. contract DonateContract { struct Donation { uint value; string donor;

    } mapping (address => Donation[]) history; event NewDonation(uint value, string donor, string message, address raddr); function donate(address _receiver, string _name, string _message) public payable { require(msg.value >= 0); history[_receiver].push(Donation(msg.value, _name)); NewDonation(msg.value, _name, _message, _receiver); _receiver.transfer(msg.value); } function getDonation(address _addr, uint _id) public view returns(uint value, string name) { require(_id >= 0 && _id < history[_addr].length); return(history[_addr][_id].value, history[_addr][_id].donor); } function getDonationsCount(address _addr) public view returns(uint length) { return(history[_addr].length); } }
  4. Business Model Stage 1 推廣期 合約免收⼿手續費 實況主可獲得 100% 捐款 捐款者負擔

    Gas 費⽤用 Stage 2 成熟期 合約採⽤用累進⼿手續類費率 提供客製化功能 (更更豐富的介⾯面、捐款特效)
  5. Stage 1 已完整上鏈運作 Stage 1 推廣期 合約免收⼿手續費 實況主可獲得 100% 捐款

    捐款者負擔 Gas 費⽤用 Stage 2 成熟期 合約採⽤用累進⼿手續類費率 提供客製化功能 (更更豐富的介⾯面、捐款特效)