OSS Technologies Limited has deployed API3DAORevenueIncinerator.sol at Ethereum mainnet address 0x41d437332798b32092E6371B667A96779Dc623F6. It is verified, and is a slightly changed and optimised version of this code: github[dot]com/ErichDylus/API3/blob/main/contracts/SwapUSDCAndBurnAPI3.sol, an automatic DAO revenue buy and LP and burner as explained in this medium article: medium[dot]com/@ugurmersin/monetizing-data-feeds-951cd5c912bd.
We want only to contribute to the API3 DAO as a community member for now, though we also consider this an initial reference for any future API3 DAO proposals we might make. OSS Technologies Limited provides review and support services for open source software developers with a focus on Solidity; while we do not provide audits, this code has been peer reviewed, passed MythX security scans, and is not meant to hold large values (small risk at any time). Because this contract is immutable, we as deployer have no way to influence this contract and API3 is free to use it, ignore it, or alter and re-deploy it, as it is open source.
This is gas-optimised and designed for high volume low value amounts to lower MEV risks. Liquidity will be lowest at the beginning, so smaller initial amounts of USDC are advisable. A substantial ETH-API3 token value balance mismatch is unlikely because neither asset is held by this contract longer than one transaction; only USDC and LP tokens may sit idle in balance.
This contract automatically buys-and-burns API3 tokens with any ETH sent directly to the contract, so excess ETH revenue could be directed to it. This also provides a swap and burn mechanism if the ETH-USDC pair on UniV2 were to become unfavourable, or if protocol contracts were to automatically direct excess revenue in the form of ETH to this contract (for example to avoid USDC blacklisting risk).
There are events in this contract for any trackers, along with the swap events in the Uniswap version 2 router for amount of API3 tokens purchased, and the burn events in the API3 token contract.
To sum, this contract is used as follows:
- send excess USDC revenue to the contract address at which point it is functionally burned (as it is irretrievable)
- any address calls either (A) swapUSDCToAPI3AndLpWithETHPair() or (B) swapFractionUSDCToAPI3AndLpWithETHPair(uint256 _divisor) to swap and LP either (A) the total USDC or (B) the total USDC / _divisor, respectively
- LP tokens can be redeemed by any address’s call to this contract only after a year, at which point the redeemed API3 tokens are burned, and the redeemed ETH and fees are automatically used to buy API3 tokens which are burned
- if ETH is sent directly to the contract address, it automatically buys and burns API3 tokens by the receive() function
- swapFractionUSDCToAPI3AndLpWithETHPair() (_divisor of 4) tx: 0xac94a5c30e8e1d3c244b04743cb0cec0b25232a8c84060b1a8a84775ca63257b
- swapUSDCToAPI3AndLpWithETHPair()tx: 0xab99c7014593081f4e93341002fdf75f95f9f02664e1ba8568686561c45caf19
- 0.0333 ETH transfer (receive()) tx: 0x05e2d2c5f2cb951d1a58cb3c09a755e0a347d8acacf0b9309c899ae892e94c89)
Changes from source file: add swapFractionUSDCToAPI3AndLpWithETHPair(), use Sol-DAO FixedPointMathLib.sol library in lieu of Sol-DAO FixedPointMath.sol, YEAR_IN_SECONDS as constant variable.