LPX calls external, on-chain contracts for the following systems:
- Uniswap pair (add liq, remove liq)
- Uniswap price oracle, 30 minute interval. Ref: https://github.com/bloq/sol-price-oracles
- Whitelist. Ref: https://github.com/bloq/sol-address-list
- name(), symbol(), decimals(): as with OpenZeppelin ERC20
- totalSupply(), balanceOf(): as with OpenZeppelin ERC20
- allowance(), increaseAllowance(), decreaseAllowance(), approve(): as with OpenZeppelin ERC20
- transfer(), transferFrom(): as with OpenZeppelin ERC20
- burn(): as with OpenZeppelin ERC20
- EIP 2612 (permit) support, aka Gas-less approvals
- Mass-pay support (sending 1-to-many), as with https://github.com/autonomoussoftware/metronome/blob/master/contracts/monolithic.sol#L506
- bootstrapMint(amount): Receive USDC to contract. Mint LPX tokens to sender on a 1:1 basis. Maximum 1,000,000 LPX may be minted this way, then this facility is disabled permanently.
- mint(source_token, amount): Receive any amount of ERC20 whitelisted tokens. Charge 1% fee. Mint LPX, based on on-chain LPX/$TOKEN price oracle. Store tokens by adding liquidity to LPX/$TOKEN Uniswap pair.
- redeem(lpx amount, target_token): Receive any amount of LPX. Charge 2% fee. Withdraw liquidity from Uniswap pair, and send to caller. Burn LPX.
- sweep(token): Uniswap token to LPX. Burn LPX.