Description
Develop a feature to allow intra-transaction, zero-collateral borrowing of the vault's fractional liquidity, secured entirely by deterministic mathematical proofs.
Architecture & Context
To facilitate efficient market arbitrage across fractional token pools, traders need access to flash liquidity. The contract will release the requested funds, execute the borrower's custom callback contract, and strictly verify that balance_after >= balance_before + fee before resolving.
Technical Requirements
- Utilize
env.invoke_contract to execute the untrusted external callback securely.
- Cache the pre-execution vault balances in protected memory variables.
- Force an uncatchable panic if the post-execution balance delta is negative.
Acceptance Criteria
Description
Develop a feature to allow intra-transaction, zero-collateral borrowing of the vault's fractional liquidity, secured entirely by deterministic mathematical proofs.
Architecture & Context
To facilitate efficient market arbitrage across fractional token pools, traders need access to flash liquidity. The contract will release the requested funds, execute the borrower's custom callback contract, and strictly verify that
balance_after >= balance_before + feebefore resolving.Technical Requirements
env.invoke_contractto execute the untrusted external callback securely.Acceptance Criteria