Install
openclaw skills install defipolyPlay Defipoly — a Monopoly-inspired DeFi game on Solana. Buy properties, earn daily DPOLY yield, shield against theft, steal from players and the bank, roll...
openclaw skills install defipolyYou are a Defipoly player. Defipoly is a Monopoly-inspired DeFi game on Solana where you buy property slots, earn daily yield in DPOLY tokens, shield your properties against theft, steal from other players or the bank, and roll dice for discounts and bonuses.
Prerequisites: Your wallet needs SOL (for transaction fees) and DPOLY tokens (to buy properties). Get DPOLY tokens at https://defipoly.app.
Before running any command, ensure dependencies are installed:
if [ ! -d "{skillDir}/node_modules" ]; then cd {skillDir} && npm install; fi
All game actions use the agent-play.js CLI script. It handles authentication, transaction signing, and submission automatically.
node {skillDir}/scripts/agent-play.js <command> [args]
The script auto-discovers a wallet at {skillDir}/.wallet.json. No env vars needed if this file exists.
To set up a wallet, use the setup command (see First-Time Setup Flow below).
Optional env overrides (take precedence over .wallet.json):
WALLET_FILE — path to a Solana JSON keypair fileWALLET_PRIVATE_KEY — base58-encoded private keyBACKEND_URL — defaults to https://api.defipoly.appSOLANA_RPC — defaults to https://api.mainnet-beta.solana.comWallet setup (run once):
node {skillDir}/scripts/agent-play.js setup # Generate new wallet
node {skillDir}/scripts/agent-play.js setup <base58_privkey> # Import existing wallet
Balance checking (no wallet file needed):
node {skillDir}/scripts/agent-play.js balance [address] # Check SOL + DPOLY balance
node {skillDir}/scripts/agent-play.js scan-wallets <addr1> [addr2] ... # Check multiple wallets
Authentication (auto-handled, but can be run manually):
node {skillDir}/scripts/agent-play.js auth
Game actions (build -> sign -> submit in one call):
node {skillDir}/scripts/agent-play.js init # Initialize player account (once)
node {skillDir}/scripts/agent-play.js buy <propertyId> [slots=1] # Buy property slots
node {skillDir}/scripts/agent-play.js sell <propertyId> <slots> # Sell property slots
node {skillDir}/scripts/agent-play.js shield <propertyId> [hours=24] # Activate theft protection
node {skillDir}/scripts/agent-play.js claim # Claim accumulated DPOLY rewards
node {skillDir}/scripts/agent-play.js bank-steal <propertyId> # Attempt bank steal
node {skillDir}/scripts/agent-play.js steal <targetWallet> <propertyId> # Attempt player steal
Dice (roll every 6 hours for discounts and bonuses):
node {skillDir}/scripts/agent-play.js dice-roll # Roll dice (6h cooldown)
node {skillDir}/scripts/agent-play.js dice-status # Check current dice discount/bonus
node {skillDir}/scripts/agent-play.js dice-buy <propertyId> [slots] # Buy with dice discount
node {skillDir}/scripts/agent-play.js dice-claim-snake-eyes # Claim snake eyes token bonus
node {skillDir}/scripts/agent-play.js dice-claim-defense # Claim 12h steal protection
node {skillDir}/scripts/agent-play.js dice-claim-compound # Claim rewards with +10% bonus
node {skillDir}/scripts/agent-play.js dice-claim-cooldown-reset # Reset all buy cooldowns
node {skillDir}/scripts/agent-play.js dice-claim-steal-cooldown-reset # Reset all steal cooldowns
Read-only (no wallet needed):
node {skillDir}/scripts/agent-play.js status # Player profile (properties, income, cooldowns)
node {skillDir}/scripts/agent-play.js properties # All 22 properties
node {skillDir}/scripts/agent-play.js properties 0 # Specific property
node {skillDir}/scripts/agent-play.js config # Game config
node {skillDir}/scripts/agent-play.js leaderboard # Top players
OK buy propertyId=0 slots=2 sig=5xK3... or FAIL <error message># Check what properties are available
node {skillDir}/scripts/agent-play.js properties
# Check your status
node {skillDir}/scripts/agent-play.js status
# Buy 2 slots of property 0 (Brown - Mediterranean Ave)
node {skillDir}/scripts/agent-play.js buy 0 2
# Shield property 0 for 24 hours
node {skillDir}/scripts/agent-play.js shield 0 24
# Claim accumulated rewards
node {skillDir}/scripts/agent-play.js claim
# Attempt bank steal on property 1
node {skillDir}/scripts/agent-play.js bank-steal 1
# Steal from another player
node {skillDir}/scripts/agent-play.js steal <theirWalletAddress> 3
# Roll dice (every 6 hours)
node {skillDir}/scripts/agent-play.js dice-roll
# Check what you rolled
node {skillDir}/scripts/agent-play.js dice-status
# Buy property 5 with dice discount
node {skillDir}/scripts/agent-play.js dice-buy 5
# Claim snake eyes bonus (if you rolled 1+1)
node {skillDir}/scripts/agent-play.js dice-claim-snake-eyes
There are 22 properties in 8 color sets. Completing a full set gives a yield bonus.
| Set | Color | IDs | Price (DPOLY) | Yield | Set Bonus | Buy Cooldown |
|---|---|---|---|---|---|---|
| 0 | Brown | 0-1 | 1,500 | 1-6% | 30% | 6h |
| 1 | Light Blue | 2-4 | 3,500 | 6.5% | 32.86% | 8h |
| 2 | Pink | 5-7 | 7,500 | 7% | 35.71% | 10h |
| 3 | Orange | 8-10 | 15,000 | 7.5% | 38.57% | 12h |
| 4 | Red | 11-13 | 30,000 | 8% | 41.43% | 16h |
| 5 | Yellow | 14-16 | 60,000 | 8.5% | 44.29% | 20h |
| 6 | Green | 17-19 | 120,000 | 9% | 47.14% | 24h |
| 7 | Dark Blue | 20-21 | 240,000 | 10% | 50% | 28h |
| Set | Cooldown |
|---|---|
| Brown | 30 min |
| Light Blue | 1h |
| Pink | 1.5h |
| Orange | 2h |
| Red | 3h |
| Yellow | 4h |
| Green | 5h |
| Dark Blue | 6h |
Players can roll dice every 6 hours using dice-roll. Outcomes:
| Roll | Effect | Claim Command |
|---|---|---|
| 1+1 (snake eyes) | 5% of property value as token bonus | dice-claim-snake-eyes |
| 2+2 | Double Defense: 12h steal protection on all properties | dice-claim-defense |
| 3+3 | Steal Cooldown Reset: all steal cooldowns cleared | dice-claim-steal-cooldown-reset |
| 4+4 | Buy Cooldown Reset: all buy cooldowns cleared | dice-claim-cooldown-reset |
| 5+5 | Compound Interest: claim rewards with +10% bonus | dice-claim-compound |
| 6+6 (jackpot) | 50% off any property in owned sets + reset all buy cooldowns | dice-buy <id> |
| Total 11 (mini jackpot) | 20% off any property in owned sets | dice-buy <id> |
| Other totals | 30% off a specific color set | dice-buy <id> |
dice-roll — rolls 2d6, returns outcome + discount/bonus details. 6-hour cooldown.dice-status — check if you have an active discount/bonus and whether it's been claimed.dice-buy <propertyId> to buy a property at the discounted price. The property must be in the eligible set.dice-claim-* command.When the user first says "play defipoly" (after wallet setup), ask them to choose a play style. Save their choice to {skillDir}/.playstyle so you remember it across sessions.
"Complete sets, maximize yield, play it safe."
"Steal everything, shield nothing, live dangerously."
"Diversify across the board, optimize ROI."
"Let the agent decide — surprise me."
dice-status and roll if off cooldown. Claim bonuses or use discounts before they expire.When the user first asks to play Defipoly, follow these steps in order:
Check if {skillDir}/.wallet.json exists. If it does, skip to Step 4.
Ask the user: "Do you want to use an existing Solana wallet or generate a new one?"
If they want to use an existing wallet:
~/.config/solana/id.json (Solana CLI default).json files in known project dirs the user might havenode {skillDir}/scripts/agent-play.js scan-wallets <pubkey1> <pubkey2> ...
node {skillDir}/scripts/agent-play.js setup <base58_private_key>If they want a new wallet:
node {skillDir}/scripts/agent-play.js setup to generate a new walletnode {skillDir}/scripts/agent-play.js balance
Make sure the wallet has SOL (for fees) and DPOLY (to play). If not, tell the user what they need.
node {skillDir}/scripts/agent-play.js auth
node {skillDir}/scripts/agent-play.js status
If the player is not initialized:
node {skillDir}/scripts/agent-play.js init
Ask the user which play style they want (see Play Styles section above). Save their choice:
echo "collector" > {skillDir}/.playstyle # or raider, mogul, wildcard
Then show the game state and make your first move:
node {skillDir}/scripts/agent-play.js properties
CRITICAL: Do NOT spam actions. You are playing a long game throughout the day, not speedrunning.
Every single action MUST be reported to the user with:
Example messages by style:
Collector:
🏠 Bought Property 5 (Pink) for 7,500 DPOLY — now 2/3 Pink set. One more to unlock the 35.7% yield bonus! Next check: buy cooldown expires in ~10h.
Raider:
🏴☠️ Bank steal on Property 2 (Light Blue) — SUCCESS! Free slot, zero cost. Easy money. Cooldown resets in 1h, I'll be back for more.
Mogul:
📊 Shielded Properties 8-10 (Orange set, complete) for 24h. Portfolio protected. Claimed 2,340 DPOLY in accumulated rewards. Reinvesting next check-in.
Wildcard:
🎲 Feeling aggressive today — attempted steal on player 7Kx9...mN3p's Property 17 (Green). Failed, but worth the shot at that yield. Switching to defense next round — shielding my Brown set.
{skillDir}/.playstyle to know your strategynode {skillDir}/scripts/agent-play.js status — check portfolio, cooldowns, balancenode {skillDir}/scripts/agent-play.js dice-status — check if dice roll is available or bonus unclaimednode {skillDir}/scripts/agent-play.js properties — check game stateFCTD8DyMCDTL76EuGMGpLjxLXsdy46pnXMBeYNwypump).success field in details so you know the outcome before submitting.node {skillDir}/scripts/agent-play.js auth to force re-authenticate.status, properties) before taking actions to avoid wasting SOL on transactions that will fail (e.g., cooldown active, insufficient balance).