List all Compound markets available across multiple chains. This function will return a list of market groups, each containing the chain ID and the markets available on that chain.
Gather market information and positions for a specific account. The account parameter is optional. If an account address is provided, this function will also return the position details for that account in that particular market. This organized information can be presented to users to assist them in making decisions.
Leverage: achieve the desired collateral exposure in a single step using a flash loan.
Deleverage: reduce the collateral exposure in a single step using a flash loan to repay the borrowed asset.
Collateral swap: replace one collateral asset with another in a single step using a flash loan.
Zap Supply: swap any token to add as base or collateral token in one transaction.
Zap Withdraw: withdraw base or collateral token, then swap to any token in one transaction.
Zap Repay: swap any token to repay as base token in one transaction.
Zap Borrow: borrow the base token, then swap to any token in one transaction.
Depending on the selected use cases, users will need to input different parameters, and the SDK will generate the expected outcome. If users are satisfied with the expected outcome and the fees, they can sign and submit the approval and transaction data. Typically, the approval is a one-time requirement for allowing Protocolink to act as a manager or a Permit2 token approval (which poses no risk as each user has their own agent within Protocolink - for further details, please visit Smart Contract).