For the complete documentation index, see llms.txt. This page is also available as Markdown.

Symbiotic

The following is the onboarding guide for Borrowers (referred to as agents in Cap contracts). The onboarding flow has been mostly automated for the Borrower — the Underwriter can handle most bulk work when deploying an instance of the Symbiotic Vault Factory contract.

Steps:

  1. Once agreements have been arranged with the Underwriter of choice, provide the Borrower's Ethereum address to the Underwriter. The Underwriter will then create the Borrower-specific Symbiotic Vault

  • After receiving the delegations from the Underwriter, the Borrower is now eligible to borrow. Note, Delegations will take up to 6 days to be effective stake.

Under the hood, the following steps happen:

  1. The Underwriter first creates a vault via the CapSymbioticVaultFactory including the Borrower address. The call will register the Borrower as SymbioticOperator in Symbiotic's Operator Registry and complete the Operator to Network Opt-in and Operator to Vault Opt-in process via the SymbioticOperator contract.

  2. Once the Vault is deployed, Cap will register the Borrower to Cap's system via the addAgent function. The function takes in the following struct:

struct AgentConfig {
    address agent;
    address vault;
    address rewarder;
    uint256 ltv;
    uint256 liquidationThreshold;
    uint256 delegationRate;
}

This function will add the Borrower to the Delegation contract, register the Vault and Borrower to Cap's Symbiotic Network Middleware and set underwriting premiums.

After stake becomes effective, Borrowers can start borrowing via the Asset page on Cap's app.

Understanding Epochs

To be compatible with Symbiotic's epoch model, Cap has its own epoch system built. As a result, there are checkpoints where Cap reads stake from Symbiotic Vaults. The checkpoints are updated every 6 days, or when there is a borrow event.

Functionally, this means that when Borrowers first receive stake, they cannot initiate a borrow until past the next Cap epoch.

Verifying the Vault

Once the Symbiotic Vault is deployed, Borrowers may verify the deployment status via the Delegation and Symbiotic Network Contracts. Use the _agent field to input the Borrower's Ethereum address.

  • Delegation contract methods:

    • Collateral: delegation asset address

    • Coverage: how much stake is live

    • Vaults: the Borrower-Underwriter specific Symbiotic Vault

    • LTV: the max borrowable loan-to-value ratio

    • liquidationThreshold

  • Symbiotic Network methods:

    • getOperator: get SymbioticOperator address for Borrower address

Managing the Symbiotic App

Once registered, the Borrower profile will be updated in Symbiotic's app page. If you wish to change the metadata on the app, please refer to Symbiotic' guide to do so.

Last updated