You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User sends ETH
|
v
Lido (0xae7a...)
submit() -> returns stETH
|
v
wstETH (0x7f39...)
wrap() -> converts stETH to wstETH
|
v
AgentTreasury (0xf5b4...)
principalWstETH locked
yield accrues via stEthPerToken() increase
agent spends yield via spend()
Contract Interactions
Deposit ETH (auto-stake + wrap)
User -> AgentTreasury.depositETH{value: X}()
-> Lido.submit() -> receives stETH
-> wstETH.wrap() -> converts to wstETH
-> records principal + stETH snapshot
Deposit stETH (auto-wrap)
User approves stETH to AgentTreasury
User -> AgentTreasury.depositStETH(amount)
-> wstETH.wrap() -> converts to wstETH
-> records principal + stETH snapshot
AgentTreasury.getAvailableYield()
-> wstETH.getStETHByWstETH(principalWstETH) = current stETH value
-> yield = current value - initial snapshot - total spent