Skip to main content

Get Started

In the current version of the Uniswap Protocol Fee system, searchers can permissionlessly capture value from the system by receiving assets valued greater than the UNI tokens provided to the system.

The simplest way to interact with the system is calling Firepit.release() from a wallet

note

It is possible to interact with the Firepit contract via a custom smart contract to enable:

  • slippage / balance checks
  • Uniswap v3 Fee collection
  • Uniswap v2 LP Token redemptions
  • UNI token flash loans

Acquire a sufficient amount of UNI

The Firepit contract requires integrators to hold a minimum amount of UNI to call release(). Participants can view the threshold by calling Firepit.threshold()

uint256 threshold = IFirepit(address(0x0000..TBD)).threshold();

Approve the Firepit to spend UNI

Because the Firepit contract transfers UNI to address(0xdead), integrating addresses must first approve the contract to spend their UNI

warning

Integrators should assess the risks of max approving the Firepit contract

IERC20(0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984).approve(
0x0000..TBD,
type(uint256).max
);

Read the Nonce

The Firepit contract uses a nonce as a safety mechanism to avoid malicious front-running. The value is provided to release(...) must be equal to the value in contract storage

uint256 nonce = IFirepit(address(0x0000..TBD)).nonce();

Call Firepit.release()

Once the value of the assets exceeds the value of the UNI tokens, integrators should call Firepit.release()

uint256 _nonce = IFirepit(address(0x0000..TBD)).nonce();

Currency[] memory _assets = new Currency[](3);
_assets[0] = Currency.wrap(address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)); // USDC
_assets[1] = Currency.wrap(address(0xdAC17F958D2ee523a2206206994597C13D831ec7)); // USDT
_assets[2] = Currency.wrap(address(0x0000000000000000000000000000000000000000)); // ETH

IFirepit(address(0x0000..TBD)).release(_nonce, _assets, 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045);