x-contracts
x-contracts copied to clipboard
V2 Optimizations
- Use CloneFactory to deploy XTokens. Check for whitelisted deployed addresses in XStore to prevent issues. DONE, pending merge approval.
- Merge setters into XStore so that one setter can take in a code and modify the appropriate param. Ditto for the NFTX controller.
- Might be easiest to just make vaults public and remove all of the extra get functions. No need for getVault then either.
- Remove xTokenAddress and nftAddress in the Vault struct because you can get them by looking at IXToken and IERC721 and using address(IXToken) etc.
- Better packing of variables in Vault struct to allow for dense representation. (Compiler optimization likely already does this).
- No need for initOwnable to be called in most cases. (Contracts inheriting from Ownable auto-set msg.sender to be owner.)
- RandNonce in XStore seems to do nothing? (And also isn't random?)
Desired goals for v2:
- Allow anyone to wrap ERC-721
- Allow anyone to wrap ERC-1155
- Provide additional ways of routing liquidity for NFTs (powered by 0x, p2p, etc.)
- Value capture for NFTX holders, fee to redeem specifically
- Integrate AMM liquidity provisioning directly through our contracts
- VRF integration for 4)
- Additional products built on top of v2 (lootboxes, gift cards, etc.)
- Smarter allow/deny lists
https://miro.com/app/board/o9J_lWCXIz0=/
Bonding curve for deposits, allows for liq
Let eligibility be deferred to an oracle that takes in id and returns a bool?