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.
Parameter | Description |
---|---|
| Address of the reserve asset. WETH, DAI, AAVE, USDC & WBTC are supported. |
| Name of the Garden |
| ERC-20 symbol of the Garden token |
| Token URI of the membership NFT |
| Seed to retrieve the garden NFT |
| Array of 12 garden parameters. See below. |
| Amount of reserve asset to be deposited by the creator |
| 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. |
| 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.
Parameter | Description |
---|---|
| 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
Parameter | Description |
---|---|
| 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
Parameter | Description |
---|---|
| 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.
Parameter | Description |
---|---|
| Address of the asset to purchase |
| 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
Parameter | Description |
---|---|
| Address of the garden |
| 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.
Parameter | Description |
---|---|
| Address of the depositor |
| Address of the referrer |
| 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.
Parameter | Description |
---|---|
| Address of the new price oracle |
EditMardukGate
Only governance can call this function.
This function edits the marduk gate (whitelist checker).
Parameter | Description |
---|---|
| 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.
Parameter | Description |
---|---|
| Address of the new garden valuer |
EditTreasury
Only governance can call this function.
This function edits the address of the treasury.
Parameter | Description |
---|---|
| Address of the new treasury |
EditHeart
Only governance or team multisig can call this function.
This function edits the address of the heart.
Parameter | Description |
---|---|
| Address of the new heart |
EditRewardsDistributor
Only governance can call this function.
This function edits the address of the reward distributor.
Parameter | Description |
---|---|
| 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.
Parameter | Description |
---|---|
| 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.
Parameter | Description |
---|---|
| 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.
Parameter | Description |
---|---|
| 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.
Parameter | Description |
---|---|
| 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.
Parameter | Description |
---|---|
| Operation kind. |
| 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