Skip to content

Lucidly syUSD idle-balance adapter for agent wallets (refresh of #20) #80

@abhicris

Description

@abhicris

Problem

Closed issue #20 specified a Lucidly syUSD auto-park flow but went stale before the partner conversation matured. The shape is right; the integration timing is now live. This issue replaces #20 with a current-spec version aligned to the 2026-06-01 partnership map (validator-slot + adapter contract together).

Agent wallets sit on idle CR8-USD / USDC between settlements. At any realistic agent payment volume (hundreds of agents, single-digit USD per settlement), 70-95% of the float is idle. Parking that float into Lucidly's syUSD vault earns yield with zero behavioral change at the agent layer.

Proposed Approach

  1. contracts/adapters/LucidlyAdapter.sol wraps the ILucidlyVault interface. Per-wallet config:
    • idle_target_bps (e.g. 8000 = 80% parked, 20% liquid buffer)
    • unpark_threshold_bps (when liquid drops below this, pull from vault before next tx)
  2. Auto-rebalance hook in AgentEscrow.release and x402_middleware.settle: after every settlement, evaluate liquid buffer vs target. If liquid > target + 5%, deposit excess. If liquid < target - 5%, withdraw from vault.
  3. switchboard/adapters/lucidly.py Python client mirror — same logic at the off-chain switchboard layer so non-EVM-native agents can use it.
  4. Realized APY card: weekly cron emits a per-wallet realized_30d_apy JSON blob to a public surface. This is the disclosure that closes the loop on the Lucidly co-marketing (per the partnership roadmap).
  5. No yield without slippage cap: if Lucidly vault entry slippage exceeds 25 bps, skip the park and log. Avoids the "yield surface looks great until you actually try to enter" trap.

Acceptance Criteria

  • LucidlyAdapter.sol deployed against testnet Lucidly vault
  • Python client mirrors the same idle_target_bps / unpark_threshold_bps config
  • Realized 30d APY card published weekly to a public switchboard surface
  • Slippage cap enforced; vault entries above 25 bps skipped + logged
  • End-to-end test: 100 simulated settlements over 30 days, target buffer maintained, no rug from vault entry slippage

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions