In the real world, when you want to sell a thing like a house, a car, etc.
You need a notary to manage an escrow and you have to pay a lot of taxes and fees
With these contracts, I search to fix this issue, remove the taxes and change the notary for a wallet or a contract
We have:
- An ERC721 token, in this case, represents a
House - An amount of ERC20 token, in this case, the value of the
Houseis100.000 USDC - 2 participants, the
Buyerand theseller - The
Agent contract - The
ERC721EscrowandERC20Escrowcontracts
After of check conditions of buying the House, the participants need to deposit the House and the 100.000 USDC
In the first transaction, someone create the two escrows(ERC20Escrow and ERC721Escrow) can be the Buyer or the Seller or some wallet
In the second transaction, the Buyer deposit the 100.000 USDC in the ERC20Escrow contract
In the third transaction, the Seller deposit the House in the ERC721Escrow contract:
The Agent contract check if the deposit of 100.000 USDC it's done:
It withdraw the House to the Buyer and the 100.000 USDC to the Seller:
All in the same transaction
This is a happy example, but can be others, if the agent its not a contracts is a wallet and the depositant dont withdraw the ERC20/721 to the Beneficiary, this agent should be mediate betweeen both