GravCore — Onchain Executor
GravCore is Blackhole’s onchain executor. It receives a signed execution packet that includes a primary transaction route and one or more fallback routes. If the primary route fails at runtime due to slippage, protocol downtime, or other violations, GravCore automatically triggers a fallback route — without requiring new signatures or manual intervention.
This ensures DeFi execution is safe, deterministic, and recoverable — even in unstable onchain conditions.
Runtime Execution Flow
Signature Verification
— GravCore verifies the integrity of the execution packet using ECDSA.recover.
Primary Route Execution
—GravCore attempts to execute the primary calldata via internal call or delegate execution pattern.
—Runtime constraints (slippage, minOut, deadlines, gas) are checked as execution progresses.
Failure Detection
—If the primary route fails (e.g., call reverts, constraint violated), execution does not halt immediately.
—GravCore invokes SafeSwitch logic, which moves to the first fallback route in the list.
Fallback Activation
—GravCore revalidates the next fallback's constraints and executes its calldata.
—This process continues until a route succeeds or all options are exhausted.
Graceful Exit
—If no route executes successfully, GravCore calls revert() without asset loss.
—No funds are retained by the contract at any point (non-custodial guarantee).
Security Properties
One Signature, Multiple Routes
— The user signs a deterministic bundle of primary + fallback logic. No external re-signing needed.
Strict Scope Enforcement
—GravCore only executes pre-signed routes. No external calls or injected logic are allowed.
Non-custodial by Design
— GravCore holds no funds, performs no value transfer unless explicitly defined in calldata.
Fallback Isolation
— Each fallback route is self-contained and state-isolated from previous attempts.
Benefits
— Resilience to bridge/pool failures and network volatility
— Safer user experience: one signature, multiple outcomes guarded by constraints
— Eliminates "stuck funds" problem common in DeFi aggregators and bridge protocols
— Enables execution confidence across chains and under variable liquidity conditions
Last updated