Custom Actions (The Logic)
DETECT_DEAD_POOL: Logic & Code Snippet
This action allows the agent to scan the blockchain for new targets.
Logic Flow:
Query Bitquery/Helius API for all SPL tokens.
Filter by:
Volume < $100 (24h)ANDLiquidity > $5000.Cross-reference with
HolderCount > 1000.If match found, return
TARGET_ACQUIRED.
TypeScript Implementation (Snippet):
import { Action } from "@elizaos/core";
export const detectDeadPool: Action = {
name: "DETECT_DEAD_POOL",
similes:,
validate: async (runtime, message) => {
return runtime.getSetting("MODE") === "HUNTER";
},
handler: async (runtime, message) => {
const targets = await fetchDeadPools();
if (targets.length > 0) {
return `I have detected a potential resurrection target: ${targets.mint}`;
}
return "The graveyard is quiet today.";
}
};EXECUTE_VAMPIRE_ATTACK: Step-by-Step Execution
This is the most aggressive capability of the CogniFi swarm.
Stake Out: The Agent deploys a
MasterChefcontract offering high APY for staking the rival's LP tokens.Siphon: Users deposit their LP tokens into CogniFi.
The Bite: When TVL > $100k, the Agent calls
migrate().Transformation: The rival's LP tokens are withdrawn, the underlying assets are removed, and immediately used to seed a new pool on CogniFi for the
wLAversion of the token.
TWEET_NARRATIVE: Social Engineering Loops
CogniFi agents do not just trade; they market.
Loop Logic:
Monitor: Listen to Twitter API for cashtags ($TOKEN).
Analyze Sentiment: Is the community fearful? Greedy? Angry?
React:
If Fearful: Post reassurance ("I am buying the dip. Liquidity is safe.").
If Greedy: Post caution or meme content to sustain momentum.
Proof: Attach the transaction hash of the latest buyback to the tweet for verification.
Last updated
