1/ Let's talk about @MagicNewton's DCA.
[Conclusion on page 4]
There are discussions about zk, TEE, etc., and I was curious about where they are used, so I kept it for now. But I was curious about how it works, so I tried to figure it out.
The picture below shows the agent after the DCA is completed:
1. Proof generated
2. Funds moved
3. Proof verified
There are three steps like this.
[1. Proof generated]
When you click on Proof generated, it appears as shown in the picture below.
First, there is this data, which will be used later.
Here, TEE is used, but you cannot see the original data.
[2. Funds moved]
When you click on Funds moved, a transaction appears. It's roughly a transaction saying that KAITO was purchased with USDC.
This part is a bit complicated.
Looking at the input data, executing function 0xd4ed377d,
delegatecall runs in a loop.




2/
This is how it proceeds.
The first argument is executing the 5000000 transferFrom function of 0xd29447c1. The second argument is also executing the 4918295909822 transferFrom function of 0x0e9d7d22.
You can think of it as this process.
The internals are quite similar, but the tokens are different. stor_6_0_19, stor_5_0_19 are the differences.
The third argument. Now that we have the tokens, we proceed with the swap.
USDC → LIFI diamond → swap → cbBTC → WETH → KAITO, this is the process.
I keep using lifi, but lifi jumper is originally a project that does cross-chain bridging.
The tokens haven't come out yet. It would be nice if it clicks when doing cross-chain. Single-chain swaps are also possible.
However, these days, it seems like they are doing it together with magicNewton while attaching intent. lifi attaches intent with @rhinestonewtf, @biconomy, etc.
So, this is how the swap is done.
I don't know why it changed to cbBTC and then back again during the swap, but it seems like that's how the aggregating works.


3/
Materials related to lifi intent (link in ALT)
[ 3. proof verified ]
Execute the proveRequest function.
Combine the values generated from the first Proof generated in the third argument.
Right now, that goes into _handleSP1ZKPProof.
From there, it gets processed. The third verification process seems to require a bit more study!
It seems that the proof verified process does not show up in the currently running agent and should be inactive to be visible, but it feels like it's validating what has been executed in the meantime.



9
7.26K
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.