BabController
Deployment Address: 0xd4a5b5fcb561daf3adf86f8477555b92fba43b5f
Interface: IBabController.sol
Functions
The following functions can be called by any user or public roles.
CreateGarden
Public: Anyone can call this function.
This function creates a new garden and adds it to the Babylon controller.
Creator must have called ERC-20 approve with the reserve asset and initial contribution on the controller address.
address _reserveAsset
Address of the reserve asset. WETH, DAI, AAVE, USDC & WBTC are supported.
string memory _name
Name of the Garden
string memory _symbol
ERC-20 symbol of the Garden token
string memory _tokenURI
Token URI of the membership NFT
uint256 _seed
Seed to retrieve the garden NFT
uint256[] calldata _gardenParams
Array of 12 garden parameters. See below.
uint256 _initialContribution
Amount of reserve asset to be deposited by the creator
bool[] memory _publicGardenStrategistsStewards
Three booleans. First one specifies whether the garden is public or private. Second one specifies whether or not anyone can create strategies. Third one specifies whether or not anyone can vote to approve strategies.
uint256[] memory _profitSharing
Three numbers, 18 decimals each. 1e18 means 100%. The three numbers must add up to 95%. They represent the strategist share of profits, steward share of profits and lp share of profits. You can pass three 0s to use the defaults.
Definition of the garden parameters:
RemoveGarden
Only Owner: Only the garden owner can call this function.
This function removes a garden from the controller. The Garden won't be able to execute any more strategies. Garden can only be removed if there are no active strategies.
address _garden
Address of the garden to remove
ClaimRewards
Public: Anyone can call this function
This function adds a referral amount earned by a depositor and referrer.
Privileged Functions
AddReserveAsset
Only Governance or team multisig can call this function
This function adds a new reserve asset to the controller
address _reserveAsset
Address of the reserve asset to add
RemoveReserveAsset
Only Governance or team multisig can call this function
This function removes a reserve asset from the controller
address _reserveAsset
Address of the reserve asset to remove
UpdateProtocolWantedAsset
Only Governance or team multisig can call this function
This function indicates the heart to purchase an asset to keep it under PCV.
address _wantedAsset
Address of the asset to purchase
bool _wanted
Boolean indicating whether the asset should be purchased by the heart
UpdateGardenAffiliateRate
Only Governance or team multisig can call this function
This function sets a referral program for a specific garden
address _garden
Address of the garden
uint256 _affiliateRate
Amount of BABL to award for the referral for unit of the reserve asset
AddAffiliateReward
Only Garden contracts can call this function
This function adds a referral amount earned by a depositor and referrer.
address _depositor
Address of the depositor
address _referrer
Address of the referrer
uint256 _reserveAmount
Amount of the reserve asset that was deposited
EditPriceOracle
Only governance or team multisig can call this function.
This function edits the price oracle of the protocol.
address _priceOracle
Address of the new price oracle
EditMardukGate
Only governance can call this function.
This function edits the marduk gate (whitelist checker).
address _mardukGate
Address of the new marduk gate
EditGardenValuer
Only governance or team multisig can call this function.
This function edits the contract that calculates the price of a garden token.
address _gardenValuer
Address of the new garden valuer
EditTreasury
Only governance can call this function.
This function edits the address of the treasury.
address _newTreasury
Address of the new treasury
EditHeart
Only governance or team multisig can call this function.
This function edits the address of the heart.
address _newHeart
Address of the new heart
EditRewardsDistributor
Only governance can call this function.
This function edits the address of the reward distributor.
address
_rewardsDistributor
Address of the new reward distributor
EditGardenFactory
Only governance or multisig can call this function.
This function edits the address of the garden factory contract.
address _newGardenFactory
Address of the new garden factory
EditGardenNFT
Only governance or multisig can call this function.
This function edits the address of the garden NFT template contract.
address _newGardenNFT
Address of the new garden NFT template contract
EditStrategyNFT
Only governance or multisig can call this function.
This function edits the address of the strategy NFT template contract.
address _newStrategyNFT
Address of the new strategy NFT template contract
EditStrategyFactory
Only governance or multisig can call this function.
This function edits the address of the strategy factory template contract.
address _newStrategyFactory
Address of the new strategy NFT template contract
SetOperation
Only governance or multi-sig can call this function.
This function edits an existing operation in the registry.
uint8 _kind
Operation kind.
address _operation
Address of the operation contract to set.
SetMasterSwapper
Only governance or multi-sig can call this function.
This function allows governance to edit the protocol default trade integration
AddKeeper
Only governance or multi-sig can call this function.
This function adds a new valid keeper to the list.
AddKeepers
Only governance or multi-sig can call this function.
This function adds an array of new valid keepers to the list.
RemoveKeeper
Only governance or multi-sig can call this function.
This function remove a keeper from the keeper's list.
EnableGardenTokensTransfers
Only governance can call this function.
This function allows transfers of ERC20 gardenTokens.
EditLiquidityReserve
Only governance can call this function.
This function edits the minimum liquidity an asset must have on Uniswap.
PatchIntegration
Only governance or multi-sig can call this function.
This function replaces old integration with a new one for all the strategies using this integration.
SetPauseGuardian
Only governance or current pause guardian can call this function.
This function
Other privileged internal functions are:
View Functions
The following functions can be called by anyone without a transaction to retrieve information from the controller.
Last updated