What it offers
- deposit: Deposit yield-bearing token as collateral
- withdraw: Withdraw collateral
- mint: Borrow synthetic asset (alUSD or alETH) against collateral
- burn: Repay synthetic asset debt
Notes
- Self-repaying: yield from deposited collateral automatically reduces debt over time
- Two Alchemist contracts: alchemistAlUSD (for USD synthetics) and alchemistAlETH (for ETH synthetics)
- Max LTV: 50% - can borrow up to half the value of deposited collateral
- yieldToken is the yield-bearing version (e.g. yvDAI, aDAI, stETH), not the base token
- Approve yieldToken to the appropriate Alchemist contract before depositing
- debt is int256 because it can be negative (overpaid/surplus)
Its names in a program
On Ethereum,Alchemix is a namespace: its contracts need no import.
Deployments
ABI
AlchemistABI
import AlchemistABI from "./protocols/alchemix/AlchemistABI.json"; Speaks for: alchemistAlUSD, alchemistAlETH.
deposit(address yieldToken, uint256 amount, address recipient) returns (uint256 shares)withdraw(address yieldToken, uint256 shares, address recipient) returns (uint256 amountWithdrawn)mint(uint256 amount, address recipient)burn(uint256 amount, address recipient) returns (uint256)liquidate(address yieldToken, uint256 shares, uint256 minimumAmountOut) returns (uint256)accounts(address owner) view returns (int256 debt, address[] depositedTokens)
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.
