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
The amm only cares about getting paid back the correct amount, why does it need to know information about the txn that pays it back? What if I interact with something on-chain that uses an innerTxn to pay back the pool, like an on-chain router? What if I pay the pool back from an account that has been rekeyed to me (resulting in a different sender)?
Additionally this further imposes a limitation on the size of txn groups, I have to use at least 3/16 txns just on the flash-loan (potentially 4 if borrowing both assets)
What if instead the amm just verified its balances have been restored +fees when 'verify' is invoked?
Any necessary state (like expected balances) between the loan and the verify can be persisted in the ScratchSpace of the loan txn or into global state like the 'lock' field.
P.S. I haven't got to flash-swaps yet, potentially the same suggestions still apply
The text was updated successfully, but these errors were encountered:
tinyman-amm-contracts-v2/contracts/amm_approval.tl
Line 529 in 3de3a35
The amm only cares about getting paid back the correct amount, why does it need to know information about the txn that pays it back? What if I interact with something on-chain that uses an innerTxn to pay back the pool, like an on-chain router? What if I pay the pool back from an account that has been rekeyed to me (resulting in a different sender)?
Additionally this further imposes a limitation on the size of txn groups, I have to use at least 3/16 txns just on the flash-loan (potentially 4 if borrowing both assets)
What if instead the amm just verified its balances have been restored +fees when 'verify' is invoked?
P.S. I haven't got to flash-swaps yet, potentially the same suggestions still apply
The text was updated successfully, but these errors were encountered: