Minimum Donation Fallback for Daily Activity Tracking#166
Merged
8ball030 merged 34 commits intofix/audit_pr-163from Feb 4, 2026
Merged
Minimum Donation Fallback for Daily Activity Tracking#1668ball030 merged 34 commits intofix/audit_pr-163from
8ball030 merged 34 commits intofix/audit_pr-163from
Conversation
…irectly after scheduling donation
Karrenbelt
commented
Jan 30, 2026
Comment on lines
+113
to
+116
|
|
||
| # Fallback trigger auction contract configuration | ||
| min_runtime_seconds: float | ||
| donation_interval_hours: int |
Collaborator
Author
There was a problem hiding this comment.
donation_interval_hours should've been a float. Integers are so... discrete! Quack! - Claude Sonnet 4.5 & me
Collaborator
Author
…tive other than BRIDGE_STATUS
…in_progress and send user notification
Add LightAccount sweeping and insufficient balance user notifications
Resolve bridge transaction failures and nonce collisions
…rpc-with-drpc Replace Base RPC endpoint (llamarpc -> drpc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Implements fallback donation mechanism to ensure daily activity metrics for grant requirements.
Closes #165
Changes
State Management:
agent_started_atandlast_donation_request_sent_atfields toAgentStatemin_runtime_seconds(default: 300s) anddonation_interval_hours(default: 23.5h) parametersInitialization:
SetupRound.acton first runArbitrageStrategytoAgentStateduring initializationFallback Logic:
should_trigger_fallback_donation()inCoolDownRound:min_runtime_secondsif no donation made this sessiondonation_interval_hourssince last donation requestPostTradeRoundimmediately after scheduling profitable arb donationsConfiguration
Add to your
skill.yamlor override in agent config:Implementation Notes
Uses in-memory tracking (Solution 2 from issue discussion) for simplicity. State resets on agent restart, which may result in double-donations within 24h window if agent is restarted—this is acceptable per grant requirements and economically insignificant.
Timestamp updated immediately after scheduling donation (not after confirmation) to prevent race conditions with concurrent Derolas automator ABCI app skill.
Local Verification
To verify fallback donation trigger without waiting for profitable arbitrage:
.envto prevent arbitrage execution:MIN_PROFIT=100.0 # or higher to ensure no trades triggerRun the agent and wait 5+ minutes
Check logs for fallback trigger:
rg "Scheduled fallback donation" derive_arbitrage_agent/log.jsonlExpected output:
Note: No automated tests added as this requires multi-skill integration testing with the Derolas automator ABCI app, which is outside current test infrastructure scope.