x-contracts icon indicating copy to clipboard operation
x-contracts copied to clipboard

V2 Optimizations

Open sudo-owen opened this issue 4 years ago • 4 comments

  1. Use CloneFactory to deploy XTokens. Check for whitelisted deployed addresses in XStore to prevent issues. DONE, pending merge approval.
  2. Merge setters into XStore so that one setter can take in a code and modify the appropriate param. Ditto for the NFTX controller.
  3. Might be easiest to just make vaults public and remove all of the extra get functions. No need for getVault then either.
  4. Remove xTokenAddress and nftAddress in the Vault struct because you can get them by looking at IXToken and IERC721 and using address(IXToken) etc.
  5. Better packing of variables in Vault struct to allow for dense representation. (Compiler optimization likely already does this).
  6. No need for initOwnable to be called in most cases. (Contracts inheriting from Ownable auto-set msg.sender to be owner.)
  7. RandNonce in XStore seems to do nothing? (And also isn't random?)

sudo-owen avatar Jan 22 '21 07:01 sudo-owen

Desired goals for v2:

  1. Allow anyone to wrap ERC-721
  2. Allow anyone to wrap ERC-1155
  3. Provide additional ways of routing liquidity for NFTs (powered by 0x, p2p, etc.)
  4. Value capture for NFTX holders, fee to redeem specifically
  5. Integrate AMM liquidity provisioning directly through our contracts
  6. VRF integration for 4)
  7. Additional products built on top of v2 (lootboxes, gift cards, etc.)
  8. Smarter allow/deny lists

sudo-owen avatar Feb 17 '21 17:02 sudo-owen

https://miro.com/app/board/o9J_lWCXIz0=/

sudo-owen avatar Feb 18 '21 16:02 sudo-owen

Bonding curve for deposits, allows for liq

sudo-owen avatar Feb 23 '21 04:02 sudo-owen

Let eligibility be deferred to an oracle that takes in id and returns a bool?

sudo-owen avatar Feb 24 '21 18:02 sudo-owen