> For the complete documentation index, see [llms.txt](https://www.docszh.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.docszh.com/solv-docs/technical-docs/smart-contracts/contract-architecture.md).

# 合约架构

<figure><img src="https://1161077445-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfjdUISsbS8UDYAUQEGRk%2Fuploads%2F5545xNrq2AriYkvIdgtR%2F%E5%90%88%E7%BA%A6%E6%9E%B6%E6%9E%84.png?alt=media&amp;token=e065369a-b6e2-421b-aa2d-0d4fc470bf23" alt=""><figcaption></figcaption></figure>

### Router合约功能

{% embed url="<https://github.com/solv-finance/SolvBTC/blob/main/contracts/SolvBTCRouter.sol>" %}
**SolvBTC和SolvBTC LST路由合约代码库**
{% endembed %}

#### 存款

```
/**
 * Subscribe with payment currency (i.e. WBTC) and receive SolvBTC.
 * @param poolId: The pool ID corresponding to SolvBTC or SolvBTC LST.
 * @param currencyAmount: Amount of currency to be deposited.
 * @return shareValue: Amount of SolvBTC to be received after subscription.
 */
function createSubscription(bytes32 poolId, uint256 currencyAmount) external returns (uint256 shareValue);
```

#### 提款请求

```
/**
 * Redeem with SolvBTC and receive currency (i.e. WBTC).
 * @param poolId: The pool ID corresponding to SolvBTC or SolvBTC LST.
 * @param redeemAmount: Amount of SolvBTC to be withdrawn.
 * @return redemptionId: TokenId of the redemption SFT to be received after redemption.
 */
function createRedemption(bytes32 poolId, uint256 redeemAmount) external returns (uint256 redemptionId);
```

#### 撤销提款请求

```
/**
 * Revoke redemption with target the tokenId of redemption SFT and receive SolvBTC 
 * with an equivalent amount of the value of the redemption SFT token.
 * @param poolId: The pool ID corresponding to SolvBTC or SolvBTC LST.
 * @param redemptionId: TokenId of the redemption SFT to be revoked.
 */
function cancelRedemption(bytes32 poolId, uint256 redemptionId) external;
```

### 提款功能

{% embed url="<https://github.com/solv-finance/solv-contracts-v3/blob/main/sft/abilities/contracts/multi-repayable/MultiRepayableDelegate.sol>" %}
**提款功能代码库**
{% endembed %}

#### WithDraw (索赔)

```
function claimTo(address to_, uint256 tokenId_, address currency_, uint256 claimValue_) external
```
