Skip to content

EscrowSend

FinTechToken edited this page Sep 2, 2018 · 5 revisions

Purpose EscrowSend lets people send value based on a hash. To receive the value you need the key that generated the hash. It only emits the hash so that the amounts and details between senders are kept private.

EscrowSend has a fixed and variable fee. The fee starts out as $0.1 + %0.1 of the transaction. The person sending funds needs the fixed fee. The percentage is paid in the type of tokens that are sent.

If a HASH is not collected in approximately 30 days the original sender can recover the funds.

The EscrowSend has transactional fees. Those fees can be distributed to EscrowSendToken holders. The EscrowSendToken also allows Token holders to vote on who the administrator is.

I imagine a chain of smart contracts where the primary holder of EscrowSendToken is the FinTechTokenProject token. This way a module of the project can be a separate smart contract whose revenues get funneled to FinTechTokenProject token holders.

The flow of funds and potential future scenarios needs to be carefully considered prior to deploying.

Smart Contract Address

0x5dA0448e07bD2fC17115b006dbA3A26D130e139b

Code

See "EscrowSend.sol"

ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x06fdde03"},{"constant":false,"inputs":[{"name":"_newTransactionFee","type":"uint8"},{"name":"_newTransactionFeeMultiple","type":"uint8"},{"name":"_newTransactionFixedFee","type":"uint256"}],"name":"updateFees","outputs":[{"name":"success_","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function","signature":"0x123fcde6"},{"constant":false,"inputs":[{"name":"_hash","type":"bytes32"},{"name":"_token","type":"address"},{"name":"_value","type":"uint256"}],"name":"sendAmount","outputs":[{"name":"success_","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function","signature":"0x2b592622"},{"constant":true,"inputs":[],"name":"transactionFixedFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x47fca313"},{"constant":false,"inputs":[],"name":"freeze","outputs":[{"name":"success_","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x62a5af3b"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"getOwnerBalance","outputs":[{"name":"success_","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x7fcf440a"},{"constant":true,"inputs":[],"name":"transactionFee","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x9ed3edf0"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"changeOwner","outputs":[{"name":"success_","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xa6f9dae1"},{"constant":false,"inputs":[{"name":"_hash","type":"bytes32"}],"name":"getNeverCached","outputs":[{"name":"success_","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xb2caffe5"},{"constant":false,"inputs":[{"name":"_hashKey","type":"string"}],"name":"getAmount","outputs":[{"name":"success_","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xe35cf0ca"},{"constant":true,"inputs":[],"name":"transactionFeeMultiple","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf5fccae2"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"mHash","type":"bytes32"},{"indexed":true,"name":"mToken","type":"address"},{"indexed":false,"name":"mNow","type":"uint256"}],"name":"HashSent","type":"event","signature":"0xa595818c9d4b46ea72fbf14cb1e6573fcb7eb0722abbb9e16736b461dffb80cd"},{"anonymous":false,"inputs":[{"indexed":true,"name":"mHash","type":"bytes32"},{"indexed":false,"name":"mNow","type":"uint256"}],"name":"HashCached","type":"event","signature":"0x99840862eecd61b78ec947ae70419d187baf3c6f89f0bfb5c311b5f0fccaf3cf"},{"anonymous":false,"inputs":[{"indexed":true,"name":"mHash","type":"bytes32"},{"indexed":false,"name":"mNow","type":"uint256"}],"name":"HashNeverCached","type":"event","signature":"0xe72702c36317763472847b2ffc1757bd0ffaab814be916bdcf71197aadcc3cfc"},{"anonymous":false,"inputs":[{"indexed":false,"name":"mTransFee","type":"uint8"},{"indexed":false,"name":"mTransmultiple","type":"uint8"},{"indexed":false,"name":"mTransFlatFee","type":"uint256"},{"indexed":false,"name":"mNow","type":"uint256"}],"name":"MessageChangeFees","type":"event","signature":"0xe422d31ad0a7139b58a00a7ad71cefc619bdf5e99c4698efc980d2414ab0e620"},{"anonymous":false,"inputs":[{"indexed":false,"name":"mFreeze","type":"bool"},{"indexed":false,"name":"mNow","type":"uint256"}],"name":"MessageFreeze","type":"event","signature":"0x4acad4a82756afd37e2d2e935cd96aa2d8c97634700f991592f3b977d6dc7d80"}]

Bytecode

0x60c0604052600a60808190527f457363726f7753656e640000000000000000000000000000000000000000000060a0908152620000409160069190620000e1565b503480156200004e57600080fd5b5060058054600160a060020a0319163317905567016345785d8a000060088190556009805461ff001960ff1990911660031716610100908117918290556040805160ff84811682529290930490911660208301528181019290925242606082015290517fe422d31ad0a7139b58a00a7ad71cefc619bdf5e99c4698efc980d2414ab0e6209181900360800190a162000186565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200012457805160ff191683800117855562000154565b8280016001018555821562000154579182015b828111156200015457825182559160200191906001019062000137565b506200016292915062000166565b5090565b6200018391905b808211156200016257600081556001016200016d565b90565b61148480620001966000396000f3006080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100fe578063123fcde6146101885780632b592622146101b357806347fca313146101cd57806362a5af3b146101f45780637fcf440a146102095780639ed3edf01461022a578063a6f9dae114610255578063b2caffe514610276578063e35cf0ca1461028e578063f5fccae2146102e7575b6040805160e560020a62461bcd02815260206004820152600b60248201527f4e6f2046616c6c6261636b000000000000000000000000000000000000000000604482015290519081900360640190fd5b34801561010a57600080fd5b506101136102fc565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014d578181015183820152602001610135565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61019f60ff6004358116906024351660443561038a565b604080519115158252519081900360200190f35b61019f600435600160a060020a0360243516604435610466565b3480156101d957600080fd5b506101e2610a6b565b60408051918252519081900360200190f35b34801561020057600080fd5b5061019f610a71565b34801561021557600080fd5b5061019f600160a060020a0360043516610b22565b34801561023657600080fd5b5061023f610cc1565b6040805160ff9092168252519081900360200190f35b34801561026157600080fd5b5061019f600160a060020a0360043516610cca565b34801561028257600080fd5b5061019f600435610d48565b34801561029a57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261019f9436949293602493928401919081908401838280828437509497506110669650505050505050565b3480156102f357600080fd5b5061023f6113ac565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103825780601f1061035757610100808354040283529160200191610382565b820191906000526020600020905b81548152906001019060200180831161036557829003601f168201915b505050505081565b600554600090600160a060020a031633146103e3576040805160e560020a62461bcd02815260206004820152600e6024820152609160020a6d20b236b4b710233ab731ba34b7b702604482015290519081900360640190fd5b6009805460ff191660ff8681169190911761ff00191661010086831681029190911792839055600885905560408051848416815291909304909116602082015280820184905242606082015290517fe422d31ad0a7139b58a00a7ad71cefc619bdf5e99c4698efc980d2414ab0e620916080908290030190a15060019392505050565b600754600090819081908190819060ff16156104cc576040805160e560020a62461bcd02815260206004820152600660248201527f46726f7a656e0000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600088815260026020526040902054600160a060020a031615610539576040805160e560020a62461bcd02815260206004820152601160248201527f4861736820616c72656164792075736564000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a038716158015906105515750600086115b9350600160a060020a038716158015610568575085155b9250831580156105755750825b806105865750838015610586575082155b15156105dc576040805160e560020a62461bcd02815260206004820152601360248201527f53656e6420546f6b656e206f7220457468657200000000000000000000000000604482015290519081900360640190fd5b8380156105ea575060085434145b8061060657508280156106065750600854341180610606575034155b151561065c576040805160e560020a62461bcd02815260206004820152600e60248201527f4e65656420657468657220666565000000000000000000000000000000000000604482015290519081900360640190fd5b83156108a9576000805260046020526000805160206114398339815191525434810110156106d4576040805160e560020a62461bcd02815260206004820152600960248201527f4f766572666c6f77310000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0387166000908152600460205260409020546106f6876113ba565b600160a060020a038916600090815260046020526040902054011015610766576040805160e560020a62461bcd02815260206004820152600960248201527f4f766572666c6f77320000000000000000000000000000000000000000000000604482015290519081900360640190fd5b604080516000602091820181905282517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018a905292518a9550600160a060020a038616936323b872dd936064808301949193928390030190829087803b1580156107e157600080fd5b5060325a03f11580156107f357600080fd5b5050604051511591506108a9905057600080526004602052600080516020611439833981519152805434019055610829866113ba565b600160a060020a03881660009081526004602052604090208054919091019055610852866113ba565b600089815260208181526040808320938a0390935560018082528383208054600160a060020a038d16600160a060020a03199182161790915560028352848420805490911633179055600390915291902042905594505b8215610a19576000341115610992575060085460008052600460205260008051602061143983398151915254348290039181906108e5846113ba565b0101101561093d576040805160e560020a62461bcd02815260206004820152600960248201527f4f766572666c6f77330000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600854610949826113ba565b600080526004602052600080516020611439833981519152805491909101919091019055610976816113ba565b60008981526020819052604090209082039055600194506109ad565b3415156109ad57600088815260208190526040812055600194505b8415610a1957600088815260016020526040902054600160a060020a0316156109ed5760008881526001602052604090208054600160a060020a03191690555b60008881526002602090815260408083208054600160a060020a03191633179055600390915290204290555b8415610a6057604080514281529051600160a060020a038916918a917fa595818c9d4b46ea72fbf14cb1e6573fcb7eb0722abbb9e16736b461dffb80cd9181900360200190a35b505050509392505050565b60085481565b600554600090600160a060020a03163314610aca576040805160e560020a62461bcd02815260206004820152600e6024820152609160020a6d20b236b4b710233ab731ba34b7b702604482015290519081900360640190fd5b6007805460ff19811660ff91821615179182905560408051929091161515825242602083015280517f4acad4a82756afd37e2d2e935cd96aa2d8c97634700f991592f3b977d6dc7d809281900390910190a150600190565b6005546000908190600160a060020a03163314610b7d576040805160e560020a62461bcd02815260206004820152600e6024820152609160020a6d20b236b4b710233ab731ba34b7b702604482015290519081900360640190fd5b600160a060020a03831660009081526004602052604090205415610cb657600160a060020a0383161515610c0957600160a060020a038316600090815260046020526040808220549051339282156108fc02929190818181858888f19350505050158015610bea57600080fd5b50600160a060020a038316600090815260046020526040812055610cad565b50600160a060020a03821660008181526004602081815260408084205481518301859052815160e060020a63a9059cbb028152339481019490945260248401525186949363a9059cbb936044808201949392918390030190829087803b158015610c7257600080fd5b5060325a03f1158015610c8457600080fd5b505060405151159150610cad905057600160a060020a0383166000908152600460205260408120555b60019150610cbb565b600091505b50919050565b60095460ff1681565b600554600090600160a060020a03163314610d23576040805160e560020a62461bcd02815260206004820152600e6024820152609160020a6d20b236b4b710233ab731ba34b7b702604482015290519081900360640190fd5b5060058054600160a060020a038316600160a060020a03199091161790556001919050565b60008181526002602052604081205481908190600160a060020a03163314610dba576040805160e560020a62461bcd02815260206004820152600e60248201527f4d7573742062652073656e646572000000000000000000000000000000000000604482015290519081900360640190fd5b60008481526003602052604090205462278d00925080830111610e27576040805160e560020a62461bcd02815260206004820152600f60248201527f333064617973206f766572666c6f770000000000000000000000000000000000604482015290519081900360640190fd5b6000848152600360205260409020544290830110610eb5576040805160e560020a62461bcd02815260206004820152602c60248201527f4d7573742062652033302064617973206f6620626c6f636b732070617374206860448201527f617368206372656174696f6e0000000000000000000000000000000000000000606482015290519081900360840190fd5b6000848152602081905260409020541561102657600084815260016020526040902054600160a060020a03161515610f5157600084815260208190526040808220549051339282156108fc02929190818181858888f19350505050158015610f1c57600080fd5b50600084815260208181526040808320839055600282528083208054600160a060020a03191690556003909152812055611026565b506000838152600160209081526040808320548383528184205482518401859052825160e060020a63a9059cbb02815233600482015260248101919091529151600160a060020a0390911693849363a9059cbb936044808201949293918390030190829087803b158015610fc457600080fd5b5060325a03f1158015610fd657600080fd5b505060405151159150611026905057600084815260208181526040808320839055600182528083208054600160a060020a0319908116909155600283528184208054909116905560039091528120555b60408051428152905185917fe72702c36317763472847b2ffc1757bd0ffaab814be916bdcf71197aadcc3cfc919081900360200190a25060019392505050565b6007546000908190819060ff16156110c8576040805160e560020a62461bcd02815260206004820152600660248201527f46726f7a656e0000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b836040516020018082805190602001908083835b602083106110fb5780518252601f1990920191602091820191016110dc565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061115e5780518252601f19909201916020918201910161113f565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600081815260029092529290205491955050600160a060020a0316151591506111fb9050576040805160e560020a62461bcd02815260206004820152601560248201527f48617368206d75737420686176652073656e6465720000000000000000000000604482015290519081900360640190fd5b6000828152602081905260409020541561136c57600082815260016020526040902054600160a060020a0316151561129757600082815260208190526040808220549051339282156108fc02929190818181858888f1935050505015801561126257600080fd5b50600082815260208181526040808320839055600282528083208054600160a060020a0319169055600390915281205561136c565b506000818152600160209081526040808320548383528184205482518401859052825160e060020a63a9059cbb02815233600482015260248101919091529151600160a060020a0390911693849363a9059cbb936044808201949293918390030190829087803b15801561130a57600080fd5b5060325a03f115801561131c57600080fd5b50506040515115915061136c905057600082815260208181526040808320839055600182528083208054600160a060020a0319908116909155600283528184208054909116905560039091528120555b60408051428152905183917f99840862eecd61b78ec947ae70419d187baf3c6f89f0bfb5c311b5f0fccaf3cf919081900360200190a25060019392505050565b600954610100900460ff1681565b60095460009060ff610100820481169116600a0a838115156113d857fe5b04029050818110611433576040805160e560020a62461bcd02815260206004820152601960248201527f466565206c657373207468616e20746f74616c616d6f756e7400000000000000604482015290519081900360640190fd5b919050560017ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3eca165627a7a7230582033f92ddb40a4cf3767565cd34234580b15ea1f46feb9d89fd046182eb75905ce0029