I have tried to implement a smart contract that allows to users to make a deal about a sale.
User A (buyer) deposit some stx or tokens in an escrow account, user B (seller) delivers something, both agree that the deal was as agreed and the money is transferred from the escrow account to the seller.
Here is an implementation for STX: https://github.com/friedger/clarity-smart-contracts/blob/master/contracts/tokens/escrow.clar
However, in clarity, there is no way to transfer STX tokens from a third party account or make a STX transaction in the name of an other account (tx-sender must be the sender of STX).
Therefore, I was trying to implement this using my own (fungible) token. (That works. It is possible to send my tokens from the escrow account to the seller. Now, the question is how this is useful for an escrow contract. If the escrow tokens are minted and transferred to e.g. the developer account, then the whole deal depends on whether the developer is willing to exchange the escrow tokens. Not a good solution business model wise.
Is there anything I am missing? Is there a better/real way to implement an escrow contract?