Flashloans are a fascinating economic coordination mechanism that has emerged out the Ethereum architecture as a result of a synchronous, sequential, atomic transaction system. It allows anonymous coordination between capital providers and arbitrageurs because the capital providers can condition providing any capital on protocol enforced guarantee that the entire arbitrage is profitable denominated in the token being lent.
One of the effects of this process has been the it ensures an efficient and healthy liquidation market for the collateral in long term debt instruments. It also enables low cost scaling of economic exploits.
Flash loans are impossible in an IBC world because IBC semantics require finalizing a block on the origin chain rather than on the receiving chain. This makes atomicity for the lender difficult and moves us into the domain of over collateralized lending.
Cinderella tokens are a lending contract where a source chain locks an amount of tokens in a time limited escrow. If at the end of the time limit, the escrow is not previously released the tokens return back to the sender.
The expectation is the Cinderella token creator must lock up some small amount of collateral on the sending chain that either goes to the redeemer of the Cinderella tokens or the originator of the loan.
Cinderella tokens are inspired by the fairytale and just like it those tokens turn into pumpkins when the clock strikes.
As long as Cinderella tokens are returned to the source chain before the escrow expires. There is a guarantee that no intermediary was double spent.
Finally a Cinderella token implementation should enable the escrow to be extended for algorithmically generated additional capital.
While Cinderella tokens can be represented as ICS20 tokens where the double spend risk floats to the user level.
Chains may want to accept Cinderella tokens in automated processes like liquidations. Doing this safely requires native support for this ICS.
Recipient chains may want to set a minimum validity margin between any un-redeemd tokens and their escrow end and require automatic sale of any tokens.
Finally , implementations should be able handle escrow updates on any coins in their possession.
There is a arb on chain B.
there are ATOMs on Chain A.
Alice is poor but knows how to exploit the arb. Bob is a whale.
Bob's smart contract/agent locks up ATOM on Chain A.
Alice gets Cinderella ATOM on chain A. Lets say the Cinderella token last for 100 blocks on Chain A.
Alice swaps the cinderella tokens for asset underpriced asset, swaps A for atoms, Atoms for cinderella Atoms, returns the cinderella atoms for A.
Any counter party that has to hold cinderella atoms knows that they can pay a small fee to extend the escrow on chain A so they should be willing to hold them at a relatively small discount to the price of ATOM. Eventually the arbs are exhausted on chain A and someone returns to the Chain A and collects a small fee.