This agent skill manages which earn vaults a user’s collateral sits in, automatically rebalancing to maximize yield while keeping the credit line active and healthy.
Compares vault yields across supported strategies
Rebalances from lower-yield to higher-yield vaults
Protects the position by only rebalancing when health factor is safe
The agent checks the user’s credit position to ensure it’s healthy enough to rebalance:
curl -X GET https://api.sprinter.tech/credit/accounts/0xUSER/info
The agent only proceeds if healthFactor > 1.5 — rebalancing temporarily changes the collateral composition, so a larger buffer is needed.
2
Discover Available Strategies
The agent fetches the protocol config to get available earn strategies and their IDs:
curl -X GET https://api.sprinter.tech/credit/protocol
This returns the credit configuration including a strategies field with available earn vaults. The agent compares the user’s current vault yield against alternatives.
3
Rebalance
If a higher-yield vault is available, the agent unlocks collateral from the current vault and re-locks into the new one using the earn param:
1. Unlock from Current Vault
2. Lock into New Vault
curl -X GET 'https://api.sprinter.tech/credit/accounts/0xUSER/unlock?amount=1000000000000000000&asset=0xCOLLATERAL_TOKEN'
Returns { calls: ContractCall[] } — execute to unlock and unwrap from the current vault.
curl -X GET 'https://api.sprinter.tech/credit/accounts/0xUSER/lock?amount=1000000000000000000&asset=0xCOLLATERAL_TOKEN&earn=NEW_STRATEGY_ID'
Returns { calls: ContractCall[] } — execute to wrap into the new vault and lock as collateral in one step.
The unlock and lock must be executed sequentially — the collateral must be fully unlocked before it can be re-locked into a new vault.
Default: every 1 hour. Vault yields change slowly, so frequent polling isn’t necessary. Hourly checks balance responsiveness with API usage.
Health Factor Threshold
Default: 1.5. Higher than the health monitor threshold (1.3) because rebalancing temporarily changes collateral composition. The extra buffer prevents accidental liquidation during the unwrap/wrap window.
Minimum Yield Improvement
Default: 0.5% APY. The agent only rebalances if the improvement exceeds this threshold. This prevents excessive on-chain transactions for marginal gains — each rebalance costs gas.
The agent can rebalance between any earn strategies returned by the protocol config:
curl -X GET https://api.sprinter.tech/credit/protocol
The strategies field in the response contains available earn vaults with their IDs — use these as the earn param when calling /lock.See Risk Management for the full collateral tier table and LTV details per vault type.