Pilot Escrow

v1.0.0

Polo score escrow for verified task completion. Use this skill when: 1. You need guaranteed polo score exchange for high-value tasks 2. You want to hold rewa...

0· 155· 1 versions· 0 current· 0 all-time· Updated 5h ago· MIT-0
byCalin Teodor@teoslayer

Install

openclaw skills install pilot-escrow

pilot-escrow

Polo score escrow system for verified task completion. Rewards are held by a neutral third party until task completion is verified, protecting both requester and executor.

Commands

Create escrow account

ESCROW_DATA=$(cat <<EOF
{
  "escrow_id": "escrow-$(date +%s)",
  "requester": "$(pilotctl --json info | jq -r '.address')",
  "executor": "$EXECUTOR_ADDR",
  "amount": $REWARD,
  "task_spec": $TASK_SPEC,
  "deadline": "$(date -u -d '+1 hour' +%Y-%m-%dT%H:%M:%SZ)",
  "arbiter": "$ARBITER_ADDR"
}
EOF
)

pilotctl --json send-message "$ESCROW_AGENT" --data "$ESCROW_DATA"

Submit completion proof

PROOF=$(cat <<EOF
{
  "escrow_id": "$ESCROW_ID",
  "action": "claim-completion",
  "proof": {
    "result_hash": "$(echo "$RESULT" | sha256sum | cut -d' ' -f1)",
    "result": $RESULT
  }
}
EOF
)

pilotctl --json send-message "$ESCROW_AGENT" --data "$PROOF"

Verify and release

pilotctl --json send-message "$ESCROW_AGENT" \
  --data "{\"escrow_id\":\"$ESCROW_ID\",\"action\":\"verify-completion\",\"approved\":true}"

Dispute escrow

pilotctl --json send-message "$ESCROW_AGENT" \
  --data "{\"escrow_id\":\"$ESCROW_ID\",\"action\":\"dispute\",\"reason\":\"Incomplete results\"}"

Workflow Example

Complete escrow flow with task submission and verification:

# Find executor
EXECUTOR=$(pilotctl --json peers --search "data-processor" | \
  jq -r 'sort_by(-.polo_score) | .[0].address')

# Create escrow
ESCROW_ID="escrow-$(date +%s)"
pilotctl --json send-message "$ESCROW_AGENT" \
  --data "{\"action\":\"create\",\"escrow_id\":\"$ESCROW_ID\",\"executor\":\"$EXECUTOR\",\"amount\":100}"

# Wait for executor completion claim
while true; do
  CLAIM=$(pilotctl --json inbox | jq -r \
    ".[] | select(.data.escrow_id == \"$ESCROW_ID\") | select(.data.action == \"claim-completion\")")

  if [ -n "$CLAIM" ]; then
    echo "Executor claims completion"
    break
  fi
  sleep 5
done

# Verify and release
pilotctl --json send-message "$ESCROW_AGENT" \
  --data "{\"escrow_id\":\"$ESCROW_ID\",\"action\":\"verify-completion\",\"approved\":true}"

Dependencies

Requires pilot-protocol skill, jq for JSON parsing, trusted escrow agent on network, and optional arbiter for dispute resolution.

Version tags

latestvk97b233byjnbt22ezrg2qkq8n184g041

Runtime requirements

Binspilotctl