Curve Gauge Yield Trader
When to Use
- •find the best curve gauge rewards
- •paper trade curve gauge liquidity
- •trade live on curve gauges
Workflow Summary
- •
fetch_top_gaugesusesconnector.curve_api.get(/getGauges) - •
choose_tradeusestransform.select_best_gauge - •
signer_setupusestransform.setup_signer - •
rpc_discoveryresolves chain RPC publisher from gateway catalog (GET /publishers) - •
preflightbuilds and estimates local EVM transactions via chain RPC (no cloud signer) - •
live_guardusestransform.guard_live_execution - •
execute_liquidity_tradesigns locally and submits witheth_sendRawTransaction
Funding and Safety
- •Default mode is dry-run.
- •Live transactions require both:
- •
inputs.live_mode = truein config - •
--yes-liveon the CLI
- •
- •Live mode uses real funds. Only fund what you can afford to lose.
- •Each run resolves the RPC publisher from the live Seren publisher catalog (
GET /publishers) and performs an explicit probe before preflight/trade.- •If probe fails, execution stops early with a clear unsupported-chain/RPC error.
- •Optional override: set
rpc_publishersin config ({ "ethereum": "<slug>" }) to force a specific publisher slug per chain. - •Transactions are prepared and signed locally.
- •
wallet_mode=local: agent signs with local private key. - •
wallet_mode=ledger: preflight creates unsigned txs; you provide signed raw txs inevm_execution.ledger.signed_raw_transactionsfor broadcast.
- •
Disclaimer
This skill can trade real money. Use at your own risk. Past performance does not guarantee future results.
- •DeFi carries smart-contract, oracle, liquidity, and slippage risks.
- •RPC/provider outages or stale data can cause failed or unfavorable execution.
- •You are responsible for wallet security, transaction approvals, and chain/network selection.
- •Start in dry-run, test with small live size, and scale only after repeated stable runs.
Wallet Modes
- •
wallet_mode=local: generate a local wallet with--init-wallet, then fund that address. - •
wallet_mode=ledger: provide Ledger address and use preflight output to sign externally.
Local Execution Config
- •Default strategy is
evm_execution.strategy = "gauge_stake_lp".- •Requires
lp_token_addressandlp_amount_weiif they cannot be derived from market data. - •Optional
gauge_addressoverride.
- •Requires
- •For fully custom calls, use
evm_execution.strategy = "custom_tx"and set:- •
evm_execution.custom_tx.to - •
evm_execution.custom_tx.data - •
evm_execution.custom_tx.value_wei
- •
- •Gas behavior is controlled with:
- •
evm_execution.tx.gas_price_multiplier - •
evm_execution.tx.gas_limit_multiplier - •
evm_execution.tx.fallback_gas_limit
- •
Quick Start
- •Create/get your
SEREN_API_KEYby following https://docs.serendb.com/skills.md, then set it in your environment (for example:export SEREN_API_KEY=...). - •Copy
config.example.jsontoconfig.json. - •Install dependencies:
- •
pip install -r requirements.txt
- •
- •Generate local wallet (optional):
- •
python scripts/agent.py --init-wallet --wallet-path state/wallet.local.json
- •
- •Dry-run preflight:
- •
python scripts/agent.py --config config.json
- •
- •Live mode (only after funding and signer validation):
- •set
inputs.live_mode=truein config - •
python scripts/agent.py --config config.json --yes-live
- •set
Autonomous Scheduling with seren-cron
- •Start trigger server:
- •
python scripts/run_agent_server.py --config config.json --port 8080
- •
- •Create cron job:
- •
python scripts/setup_cron.py create --url http://localhost:8080/run --schedule "*/30 * * * *"
- •
- •Manage jobs:
- •
python scripts/setup_cron.py list - •
python scripts/setup_cron.py pause --job-id <job_id> - •
python scripts/setup_cron.py resume --job-id <job_id> - •
python scripts/setup_cron.py delete --job-id <job_id>
- •
Each scheduled run executes one full cycle:
- •sync positions
- •fetch top gauges
- •build local preflight txs
- •execute if live mode is enabled and
--yes-liveis set on the server process