Flash Actions
Last updated
Last updated
Flash Actions (or optimistic Actions or flash accounting) expand on the concept of flashloans and are only possible thanks to a unique property of smart contracts: . Just like with flashloans, each step of the Flash Action must be successful, or the transaction as a whole fails.
This allows the Account Owner to temporarily bring the Account into an under-collateralized (or even non-collateralized) state without risk of bad debt for any Creditor. If the Account is not brought back into a healthy state during the transaction, the final health check fails, and thanks to atomicity, the whole transaction fails.
This gives Account Owners unprecedented flexibility to manage assets and liabilities. It overall provides a much better user experience, since users only need to do a single transaction to obtain their desired outcome.
In a fully permissionless way, they can chain the following actions together in one Flash Action:
A margin Account can be opened for a new Creditor if the new Creditor is approved by the Account Owner.
The Creditor can execute arbitrary logic (e.g., give a flashloan).
The Account owner can optimistically withdraw assets from the Account.
The Account owner can transfer assets from their own wallet to the Account or external logic.
The Account owner can execute arbitrary external logic, using the assets (borrowed, withdrawn, or transferred) to interact with multiple DeFi protocols to swap, stake, claim, etc.
The Account owner can deposit recipient tokens back into the Account.
The only requirement is that the Account is in a healthy state at the very end of the Flash Action.
Flash Actions are a very powerful tool that has no equal in traditional finance. We will list a few examples of how Flash Actions from an Arcadia Account can be used out of the box (the list is far from exhaustive).
Rebalance whole portfolios, swapping a portfolio of n different assets directly to a new portfolio of m different assets.
Refinance liabilities (change to different Creditors) without the need to sell any collateral.
Stake or provide liquidity on approved DeFi protocols. External protocols used in this context must provide a receipt token that is allowed as collateral within the Arcadia Protocol. Examples include providing liquidity on Aave (receiving approved aTokens), depositing assets on Yearn (receiving approved yTokens), etc.
Change ranges for Uniswap V3 LP. Contrary to Uni V2 and similar AMMs, Uni V3 positions are meant to be more actively managed in terms of liquidity ranges. Users who deposit Uni V3 positions in their Arcadia Accounts will be able to change those liquidity ranges without withdrawing their tokens first.
Claim airdrops that depend on address-owned tokens. Arcadia Accounts will feature “flash withdrawals”. This feature can be used by the Account owner to claim airdrops using assets under collateral within their Arcadia Account, without having to close DeFi positions to withdraw their tokens first.
...
Keep in mind that all of these actions can be done, even if the assets in the Account are used to secure liabilities!