# Bali Upgrade Reference
## New options for contract deployment params
- `Token.reservedUntilTokenId`
- Reserve N tokens for claiming via an authorized minter.
- For colleciton plus this option will be set to the original tokens total supply
- `Token.metadataRenderer`
- The address of an alternate metadata renderer to use with this DAO.
- Defaults to the standard renderer in address 0 is provided
- `Auction.founderRewardRecipent`
- The address to send founder protocol rewards to
- `Auction.founderRewardBPS`
- The percentage of each bid a founder will recieve in Basis Points
## How to use the new minters
To use a minter it must be set with `Token.updateMinters`.
### MerkleReserveMinter
- initilize with `setMintSettings`
- `mintStart` the timestamp for minting to start
- `mintEnd` the timestamp for minting to end
- `pricePerToken` the price for one token in wei
- `merkleRoot` the merkle root to use for the allow list
- `function mintFromReserve(address tokenContract, MerkleClaim[] calldata claims)`
- pass the DAOs token contract as `tokenContract`
- pass an array of `MerkleClaim` as `claims`
- `mintTo`: user to mint tokens to
- `tokenId`: selected token to claim
- `merkleProof`: the generated merkle proof for a claim generated from abi.encode(mintTo, tokenId) as the leaf
- When using this minter it is possible for early claimers to frontrun governance which could be critical if a DAO has no veto set. to mitigate this be sure to call `updateDelayedGovernanceExpirationTimestamp` on the `Governor` contract and set a `_newDelayedTimestamp` of at least 24 hours after `mintStart`.
- A service like https://lanyard.org/ can be used to create merkle roots / proofs
## How to use a custom metadata renderer
- provide an address via `Token.metadataRenderer` when creating a new DAO. call the initilization function on the new metadata renderer proxy once deployed.
- to build a custom renderer follow examples in this repo: https://github.com/neokry/builder-renderers (these are unaudited use at your own risk)
- if a custom renderer is set after DAO deployment be sure that all calls to `tokenURI` with current tokenIds will not revert. THIS WILL CAUSE ISSUES if `tokenURI` reverts
## How to use protocol rewards for auctions
- call `createBidWithReferral` on the auction contract and pass in a `_referral` address.
- 2.5% of the auction bid will go to the `_referral` address of the winning bid
- if `founderRewardRecipent` and `founderRewardBPS` the amount of `founderRewardBPS` in percent will be sent to the `founderRewardRecipent`.
## How to claim protocol rewards
Users can claim protocol rewards via the `ProtocolRewards` contract with either of these functions
- `function withdraw(address to, uint256 amount)` to withdraw an `amount` from a users reward balance to a specified address `to`
- `function withdrawFor(address to, uint256 amount)` to withdraw an `amount` from a spcified account `to`