Trade Execution Mechanics
This section breaks down execution mechanics step by step, highlighting the key formulas and logic that shape the system.
DCA.FUN uses a network of independent “executors” to make sure your trades happen fairly and securely, using real-time prices from Chainlink Data Streams and secure transfers with Permit2. Here’s what happens when your order is ready to trade:
1. Order Preview
Executors first check your order to see if it’s ready (right time, right number of repeats, and valid tokens).
We how much needs to be traded and what the current price is.
The system figures out exactly how many tokens will be needed to fill your order.
2. Trade Execution
Executors use the info from the preview to actually fill the order.
We use Permit2 for secure token transfers, no need for manual approvals.
The protocol collects its small fee automatically.
Your tokens (tokenIn) are taken from your vault and sent to the executor of the fill.
You receive your new tokens (tokenOut), either directly or staked for yield (if you choose).
3. Yield Management (Optional)
While your tokens wait to be traded, they can earn interest in Aave.
After you receive new tokens, you can also choose to have them staked for extra yield.
Withdraw your yield anytime if you want.
4. Order Updates
The system updates your order: tracks how many trades have happened, and marks it complete when finished.
5. Safety & Security
Only the correct, up-to-date Chainlink price feeds are used, updating every ~200ms.
All transfers use Permit2 for security, no one touches your tokens without permission.
Each order is kept in its own vault, so your funds are never mixed with anyone else’s.
6. Executor Incentives
The free market decides when it’s best to fill each trade, popular pairs get filled fast, rare ones offer bigger rewards.
Summary: Your trades on DCA.FUN are executed by a decentralized network using up-to-the-second prices and safe transfers. You earn yield while waiting, set your own limits, and always stay in control. The system is designed for security, fairness, and efficiency, no middlemen required.
Last updated