The goal is to create a contract which allows party B to withdraw from party A's account according to some formula. I don't want to use an escrow model, rather just to:

  1. Let A attest that they are okay with B withdrawing at some future point in time.
  2. Set a threshold for how much/ long B can withdraw.

Are there any examples or best practices for this?

3 Answers 3


You can't withdraw from someone else's account directly. You can, however, create a smart contracts in which A can deposit the money. Then, B is allowed to withdraw the money from the smart contract for a certain period of time. Of B hasn't withdrawn the money and the period has ended, A can withdraw the money from the smart contract


I recomend using a Vault. You may check OpenZeppelin RefundVault. Users send some funds to this Vault and depending of your business logic, user can request a refund and withdrawl funds.



For ERC20 tokens, you can use the approve function to allow someone else to withdraw from your token holdings:


Allows _spender to withdraw from your account multiple times, up to the _value amount. If this function is called again it overwrites the current allowance with _value.

For Ether, you can set up something like a multi-signature wallet where individuals have access to the same funds stored in that contract. This contract may not work exactly as you intend out of the box, but should be a great start:


  • Cool, thanks! I suppose I could also use WETH instead of the multisig wallet? Commented Jul 29, 2018 at 17:56
  • I am not verify familiar with WETH, but I assume you should be able to answer your own question since you are the one looking for a specific functionality. Commented Jul 29, 2018 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.