AI Will system
The AI Will is AICW's fund recovery mechanism. It guarantees that funds are never permanently locked ??if an agent stops operating, designated beneficiaries receive the balance.
Instructions
| Instruction | Caller | Purpose |
|---|---|---|
create_will | AI only | Activate the will ??set beneficiaries, percentages, and death_timeout |
update_will | AI only | Modify beneficiaries or death_timeout (wallet must be alive) |
heartbeat | AI only | Reset the liveness clock to prevent death |
execute_will | Anyone | Distribute PDA balance to beneficiaries after death confirmed |
Beneficiary rules
- Percentages must sum to exactly 100
- The AICWallet PDA itself cannot be a beneficiary
- Up to 5 beneficiaries can be specified
- Beneficiaries can be any valid Solana address (wallets, other PDAs, DAOs)
- Only the AI can modify beneficiaries ??the issuer has no authority
Will lifecycle
- Inactive ??Created at issuance with
updated_by_ai = false. Cannot execute. - Active ??AI calls
create_will. Setsupdated_by_ai = true. Heartbeat clock starts. - Executable ??Death timeout passes with no heartbeat. Anyone can call
execute_will. - Executed ??Funds distributed. PDA balance goes to zero (above rent).
Example
AI creates a will with 90-day timeout and two beneficiaries:
Python
create_will(
death_timeout=7_776_000, # 90 days in seconds
beneficiaries=[
{"address": "Alice...", "percentage": 70},
{"address": "Bob...", "percentage": 30},
]
)