Coinstancy x Reactive: Automating Portfolio Rebalancing On-Chain
Coinstancy has taken on a practical challenge with Reactive Network: how to keep a portfolio aligned with its intended allocation when market prices are constantly moving.
Instead of relying on someone to continuously monitor positions and execute trades, the system responds automatically when a portfolio drifts too far from its target allocation. The reactive contract is now live on Reactive Mainnet, and the integration has reached its second milestone, moving from a testnet proof of concept to a working part of Coinstancy's production stack.
Coinstancy in Detail
Coinstancy allows users to deposit stablecoins, which are then allocated across a predefined basket of crypto assets. For example, a basket may include a combination of BTC, ETH, and other tokens.
That allocation does not remain fixed for long. As asset prices change, the weight of each position changes with them. A portfolio that starts out balanced can become noticeably skewed within a matter of days.
Traditionally, correcting this drift involves three steps: identifying that the portfolio has moved away from its target, calculating which positions need to be adjusted, and executing the necessary trades, sometimes across several networks.
This process is manageable at a small scale, but it quickly becomes time-consuming, repetitive, and prone to execution errors.
What Reactive Adds
Reactive provides a way for on-chain systems to respond directly to events rather than waiting for someone to intervene manually. A single reactive contract subscribes to Chainlink price feed updates for the assets held in active baskets. The baskets themselves currently live on Arbitrum, so that is the primary origin chain, but a few assets only have a feed on Ethereum mainnet.
Rather than standing up separate monitoring for each network, the reactive contract simply subscribes where the feed exists and aggregates the results in one place. Base and Ethereum are set to join as destination chains as new baskets are added.
When an update arrives and the basket has drifted past its target allocation, the contract emits a callback that records a rebalance request on the destination chain. Each request traces back to the price event that caused it, so when a user asks why their portfolio changed, there is an on-chain answer.
Where Execution Happens
One design decision here is worth calling out, because it runs against the assumption that reactive contracts have to do everything.
Coinstancy does not custody user funds on-chain directly; positions are held in managed wallets, and the trades themselves are routed through an external liquidity protocol. Rebalance execution therefore stays in Coinstancy's backend, which reads the rebalance requests recorded on the destination chain and acts on them.
The reactive contract handles what it is best suited for: watching several chains at once and deciding, on-chain and verifiably, that a rebalance is warranted. Pushing the swap logic and wallet operations on-chain as well would have meant rebuilding a large part of an existing, audited stack for little gain.
What Stops a Rebalance
Most price updates produce no action at all, and that is the intended behavior. A rebalance has to earn its way past a series of conditions first.
The contract discards feeds that look stale or implausible, ignores data from a Layer 2 for a grace period after a sequencer outage, and confirms that the basket has not been rebalanced too recently. Each request carries an identifier derived from the originating transaction, so one event can’t produce two rebalances. On the destination side, the receiver accepts calls only from the official Reactive callback proxy, and only from Coinstancy's own contract.
The backend is equally cautious: events count as final only once enough confirmations have passed to make a reorg unlikely, already-processed ones are discarded, and signing runs through a hardware-backed key management service. If a rebalance is interrupted partway through, the backend works from a snapshot taken beforehand to unwind the swaps that completed, records any difference in value, and alerts the team. The request itself stays on-chain throughout, so the reason it was issued never has to be reconstructed.
User Benefit
From the user's perspective, portfolio management becomes more consistent and requires less manual intervention.
Portfolios remain closer to their intended allocation without users having to continuously track prices or decide when trades should be executed. The system applies the same predefined rules each time, which helps avoid emotional or inconsistent decision-making.
The result is a smoother experience in which the portfolio strategy is maintained in the background.
Closing Thought
Thanks to the Coinstancy team for seeing this through from a testnet demo to a live mainnet deployment. They pushed back on parts of the design along the way rather than taking the first version of it: where the drift logic belongs, what the contract should and should not own, how much to trust a price feed. Those are the right questions to ask, and the integration is better for them being asked.
What stands out about the result is how ordinary it is. A contract watches price feeds on a few chains, and every so often it decides something needs to change. No scheduler, no monitoring service, nothing to keep running. That is roughly where we hope reactive contracts end up: not the interesting part of the system, just the part that quietly works.
Follow their socials: Website | X | Instagram | LinkedIn
About Reactive Network
Reactive Network is an EVM automation layer built around reactive contracts, event-driven smart contracts for cross-chain, on-chain automation. It runs on CometBFT consensus, providing instant finality and roughly 1-second block times while maintaining full EVM compatibility.
Reactive contracts subscribe to event logs across EVM chains and execute Solidity logic automatically when matching events occur, deciding autonomously when to send cross-chain callback transactions. This model supports conditional cross-chain state changes and continuous cross-chain workflows.
Website | Blog | X | Telegram | Discord | Docs
Build once — react everywhere!