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

Stateful TXO is the new Contract

sgtn
December 18, 2018

Stateful TXO is the new Contract

sgtn

December 18, 2018
Tweet

More Decks by sgtn

Other Decks in Technology

Transcript

  1. For better UTXO Contract Cryptoeconomics Lab / Sg

  2. We need simpler paradigm of UTXO based contract

  3. Visualization of TX in UTXO model

  4. Stateful TXO Stateful TXO

  5. Stateful TXO = Contract Let’s say

  6. Contract Log

  7. Pick a Log (Stateful UTXO) by TxID Prepare the data

  8. Update Contract(ex-Log) by prepared data And next Log

  9. Breakdown to the Language Design

  10. Build Stateful TXO owners: “0xH2ZX87….” values: SimpleToken(ticker:”ZRX”, amount:394) state: {

    “pairedTokenName”: “DAI”, “price”: 100 } blockNum: undefined
  11. Update the Contract Solidity esque

  12. owners: “0xH2ZX87….” values: SimpleToken(ticker:”ZRX”, amount:394) state: { “pairedTokenName”: “DAI”, “price”:

    100 } blockNum: 10092 owners: “0xA11287J….” values: SimpleToken(ticker:”DAI”, amount:100) state: null blockNum: 9802 owners: “0xA11287J….” values: SimpleToken(ticker:”ZRX”, amount:394) state: null blockNum: undefined owners: “0xH2ZX87….” values: SimpleToken(ticker:”DAI”, amount:100) state: null blockNum: undefined Wallet will implicitly do this And SDK would be generated from DSL UTXO1 UTXO2 New UTXO1 New UTXO2
  13. owners: “0xH2ZX87….” values: SimpleToken(ticker:”ZRX”, amount:394) state: { “pairedTokenName”: “DAI”, “price”:

    100 } blockNum: 10092 owners: “0xA11287J….” values: SimpleToken(ticker:”DAI”, amount:100) state: null blockNum: 9802 owners: “0xA11287J….” values: SimpleToken(ticker:”ZRX”, amount:394) state: null blockNum: undefined owners: “0xH2ZX87….” values: SimpleToken(ticker:”DAI”, amount:100) state: null blockNum: undefined New perspective/paradigm is like this. Contract Arg1 Log1 Log2