Escrow Module
Secure funds management.
Created: 1/9/2026
Escrow Module (escrow_module)
The escrow_module acts as the vault for the gig economy platform. It is responsible for the custody of funds, ensuring they are only moved according to strict protocols.
Key Features
- Central Pool: Uses a resource
EscrowPoolto hold generic assets (AptosCoin). - Programmatic Access: Only authorized modules (friends) or specific entry functions can move funds.
Functions
escrow_funds
- Input:
account(signer),amount(u64). - Logic: Withdraws
amountfrom theaccountand merges it into theEscrowPool. - Usage: Called by
gig_contractupon gig creation andlocation_based_gigfor funding pools.
release_funds
- Input:
beneficiary(address),amount(u64). - Logic: Withdraws
amountfrom theEscrowPooland deposits it into thebeneficiary's account. - Usage: Called upon successful job completion or dispute resolution favoring the worker.
return_funds
- Input:
poster(address),amount(u64). - Logic: Returns
amountfrom theEscrowPoolback to the original poster. - Usage: Called if a gig is cancelled, or if a dispute is resolved in favor of the poster.
