Degenbox is an authorized fork of BentoBox arrow-up-right (as Abracadabra purchased the licence for it). Cauldrons are built on top of both BentoBox and Degenbox, which allow users to reduce transaction fees as well as allow the creation of multiple strategies for the assets held inside.
Please do not send funds directly to either BentoBox or Degenbox as they will be lost! Use the "Deposit" function instead!
Parameters
Write Functions
Parameters
No parameters for this function.
Return values
Parameters
The address which balance is checked
Return values
Shares of 'token' owned by 'address'
Parameters
An array of inputs for each call.
If True then reverts after a failed call and stops doing further calls.
Return values
An array indicating the success of a call, mapped one-to-one to calls.
An array with the returned data of each function call, mapped one-to-one to calls.
Parameters
The address of the contract that implements and conforms to IBatchFlashBorrower and handles the flashloan.
The address of the contract that implements and conforms to IBatchFlashBorrower and handles the flashloan.
The addresses of the tokens.
amounts of the tokens for each receiver.
The calldata to pass to the borrower contract.
Return values
No return values for this function.
Needs to be called by pendingOwner to claim ownership.
Deploys a given master Contract as a clone.
Parameters
The address of the contract to clone.
Additional abi encoded calldata that is passed to the new clone via IMasterContract.init.
Creates the clone by using the CREATE2 opcode, in this case data will be used as salt.
Return values
Address of the created clone contract.
Parameters
The ERC-20 token to deposit.
which account to pull the tokens from.
which account to push the tokens to.
Token amount in native representation to deposit.
Token amount represented in shares to deposit. Takes precedence over amount.
Return values
The deposited amount represented in shares.
Parameters
The address of the contract that implements and conforms to IFlashBorrower and handles the flashloan.
Address of the token receiver.
The address of the token to receive.
Amount of the tokens to receive.
The calldata to pass to the borrower contract.
Return values
No return values for this function.
The actual process of yield farming. Executes the strategy of token. Optionally does housekeeping if balance is true.
Parameters
The address of the token for which a strategy is deployed.
True if housekeeping should be done.
The maximum amount for either pulling or pushing from/to the IStrategy contract.
Return values
No return values for this function.
masterContract to user to approval state, returns True if the user has approved the masterContract.
Parameters
Address of the masterContract.
Return values
Returns True if the masterContract is approved by user.
Mapping from clone contracts to their masterContract.
Parameters
Address of the cloned contract.
Return values
Address of the masterContract clone contract is cloned from.
User nonces for masterContract approvals.
Parameters
Return values
Owner of the DegenBox contract. Can perform actions that onlyOwner() can perform, such as strategy updates.
Parameters
No parameters for this function.
Return values
When transferring ownership, the future owner is pending until they claims ownership.
Return values
Address of the pending owner.
Strategy change being submitted to a delay of 3 days, the setStrategy function is called twice, once to declare a strategy change, and another time after STRATEGY_DELAY (3 days). In between those calls, the new strategy is pendingStrategy.
Parameters
The address of the token that maps to a strategy to change.
Return values
The address of the contract that conforms to IStrategy.
Parameters
The ERC20 token that supports permit to call permit on.
The token owner's address
The token spender's address
The amount to be approved.
Timestamp in the future until which permit can be called.
v of the ECDSA signature.
r of the ECDSA signature.
s of the ECDSA signature.
Return values
No return values for this function.
Parameters
No parameters for this function.
Return values
No return values for this function.
Parameters
Return values
No return values for this function.
Sets the contract address of a new strategy that conforms to IStrategy for token. Must be called twice with the same arguments. A new strategy becomes pending first and can be activated once STRATEGY_DELAY is over. In the case of the Degenbox, STRATEGY_DELAY is 3 days.
Parameters
The address of the token that maps to a strategy to change.
The address of the contract that conforms to IStrategy.
Return values
No return values for this function.
Sets the target percentage of the strategy for token. It corresponds to the percentage of tokens deployed to the Strategy, vs kept in DegenBox.
Parameters
The address of the token that maps to a strategy to change.
The new target in percent. Must be lesser or equal to MAX_TARGET_PERCENTAGE.
Return values
No return values for this function.
Returns the address of the Strategy mapped to the given ERC20 token.
Parameters
The address of the token that maps to a strategy
Return values
The address of the current strategy: a contract that conforms to IStrategy.
Parameters
The address of the token that maps to a strategy
Return values
Timestamp of the strategy start date.
Current targetPercentage (% of funds wanted in strategy) of the token
Current balance held by strategy (before harvest)
Converts amounts of shares of a token into it's native representation.
Parameters
If the result should be rounded up.
Return values
The share amount back into native representation.
Converts amounts of a token in it's native representation into shares.
Parameters
If the result share should be rounded up.
Return values
The token amount represented in shares.
Keeps track of how many tokens are stored by DegenBox as well as how many shares are held by users.
Parameters
ERC20 Address which total we want.
Return values
How many tokens (in native representation) are deposited into DegenBox.
How many shares of tokens are held by users.
Transfer shares from a user account to another one.
Parameters
The ERC20 token to transfer.
The account to transfer token from.
The account to transfer token to.
The amount of shares to transfer.
Return values
No return values for this function.
Transfer shares from a user account to multiple other ones.
Parameters
The ERC20 token to transfer.
The account to transfer token from.
The accounts to transfer token to.
The amount of token in shares for each receiver in tos.
Return values
No return values for this function.
Transfers ownership to newOwner. Either directly or claimable by the new pending owner. Can only be invoked by the current owner.
Parameters
Address of the new owner.
True if newOwner should be set immediately. False if newOwner needs to use claimOwnership.
Allows the newOwner to be address(0) if direct and renounce is True. Has no effect otherwise.
Return values
No return values for this function.
Enables or disables a contract for approval without signed message.
Parameters
masterContract which status is being changed.
Return values
No return values for this function.
Returns True if a masterContract is whitelisted.
Parameters
Address of the masterContract.
Return values
Withdraws an amount of token from a user account.
Parameters
The ERC-20 token to withdraw.
From which user to pull the tokens.
To which user to push the tokens.
Amount of tokens. Either one of amount or share needs to be supplied.
Like above, but share takes precedence over amount.
Return values
Amount of token withdrawn, in native representation.
Shares of token withdrawn.
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters