What it offers
- borrow: Borrow MIM from a Cauldron
- repay: Repay MIM debt
- addCollateral: Add collateral to a Cauldron position
- removeCollateral: Remove collateral from a Cauldron position
Notes
- Isolated Cauldron markets - each has specific collateral type and risk parameters
- DegenBox is the underlying vault that holds all assets (BentoBox fork)
- Amounts use “part” (debt accounting) and “share” (DegenBox shares) - not raw token amounts
- skim=false means transfer tokens from caller; skim=true means use tokens already in DegenBox
- Deposit collateral to DegenBox first, then addCollateral to a Cauldron
- Common collateral: sSPELL, yv tokens, LP tokens, yield-bearing assets
Its names in a program
On Ethereum,Abracadabra is a namespace: its contracts need no import.
Deployments
ABI
CauldronABI
import CauldronABI from "./protocols/abracadabra/CauldronABI.json";
addCollateral(address to, bool skim, uint256 share)removeCollateral(address to, uint256 share)borrow(address to, uint256 amount) returns (uint256 part, uint256 share)repay(address to, bool skim, uint256 part) returns (uint256 amount)userCollateralShare(address user) view returns (uint256)userBorrowPart(address user) view returns (uint256)
DegenBoxABI
import DegenBoxABI from "./protocols/abracadabra/DegenBoxABI.json"; Speaks for: degenBox.
deposit(address token, address from, address to, uint256 amount, uint256 share) payable returns (uint256 amountOut, uint256 shareOut)withdraw(address token, address from, address to, uint256 amount, uint256 share) returns (uint256 amountOut, uint256 shareOut)balanceOf(address token, address user) view returns (uint256)
Next steps
- Protocols: the other protocols, by what they do.
- Protocols and tokens: calling a contract by its namespace, or through its ABI.
- Glossary: the words these pages use, in plain terms.
