Skip to main content

Gnome Factory 🏭

Welcome to the Gnome Factory, where we bring the magic of intertwining decentralized finance with NFTs to life! This contract is your gateway to minting Gnomes and diving into the world of concentrated liquidity in the Uniswap V3 pool.

Overview

The Gnome Factory is the contract responsible for minting your gnomes, using your fee it swaps half for $GNOME and creates a concentrated liquidity on the UniswapV3 GNOME/WETH pair.

Key Functions

Minting Gnomes

Embark on your GnomeLand journey by minting Gnomes through the mintGnome() function or you can ask a fren for a referral code and use mintGnomeReferral() for a discounted mint.

Minting price can change depending on the demand for gnomes, the Gnomes NFT price is fetched from the Uniswap pool using the TWAP cumulative price to avoid manipulation, giving a factory discount of 15% on the current market price and 40% for Referrals.

function mintGnome(string memory code, string memory userX) public payable returns (uint _tokenId, uint128 liquidity, uint amount0, uint amount1, uint refund0, uint refund1);
function mintGnomeReferral(string memory code, string memory userX) public payable returns (uint _tokenId, uint128 liquidity, uint amount0, uint amount1, uint refund0, uint refund1);

Claiming Rewards

There are two types of rewards stored in GnomeFactory mappings, the first stores some $Gnome that didnt make it into the position created when your gnome was minted and also from rebalancing the gnome position. This can be claimmed by calling the claimRewards() function. The second is the GameRewards that are proportional to the position value of your gnomes and grows daily.

In game rewards can be spent in the GnomeFeeder and other GnomeLand contracts that call the spendGnomeRewards() function to keep your gnome happy!

function claimRewards() external returns (uint rewards);
function spendGnomeRewards(address gnome, uint256 itemPrice) public onlyAuth nonReentrant