Canisters
Key Canisters/关键的canister
一共有5个,分为功能性容器和代币容器,代币容器有CUSD、CLPT,功能性容器有Vault、Reserve Pool、Staking Pool,接下来分别介绍
Vault/质押金库
Users pledge and borrow here. 用户在这里质押和贷款,还款,每种底层资产都对应一个资金池,定期更新代币价格和检查用户资产是否到达清算线
Main Methods/主要方法:
deposit(token,amount)/存入:
Users deposit underlying assets such as ckETH to obtain a credit limit and simultaneously generate CLPT, which can be claimed from the Staking Pool.
用户存入底层资产如ckETH,获得授信额度,同步将产生CLPT,在Staking Pool中领取
borrow(token,amount)/借出:
Obtain CUSD loans based on the user's credit limit and simultaneously generate CLPT, which can be claimed from the Staking Pool.
根据用户的信用额度,获得贷款CUSD,同步将产生CLPT,在Staking Pool中领取
repayment(token,amount)/:
用户还款CUSD,偿还债务
Liquidation Reserver Pool/流动性池
Users deposit CUSD to receive CLPT tokens and periodically update the deposit-to-loan ratio for each user.
用户存入CUSD,获得CLPT代币,当Vault发生清算的时候,用户获得ckETH或ckBTC等代币,支付给Vault的CUSD销毁
Main Methods/主要方法:
deposite(amount):
Users deposit CUSD.
用户存入CUSD
withdraw(amount):
用户提取CUSD
liquidate(cusd_amount, asset_amount, underlying):
只有Vault调用,自动清算资不抵债的用户资产
withdrawUnderlying(token,amount):
Users withdraw assets subject to liquidation.
用户提取被清算资产
claim():
Claim CLPT tokens.
领取CLPT代币Staking Pool/质押代币池
Users stake CLPT into this pool to earn CLPT rewards.
用户将CLPT存入该池子,获得CLPT收益;用户质押和借贷将会获得的CLPT也会在这里领取
Main Methods/主要方法:
stake(amount):
Stake CLPT to earn CLPT rewards.
质押CLPT获得CLPT收益
withdraw(amount):
Calculate and withdraw part or all of the rewards for the user.
给用户计算收益并提取部分或全部收益
Last updated