| Crates.io | bvs-vault-cw20 |
| lib.rs | bvs-vault-cw20 |
| version | 2.4.0 |
| created_at | 2025-05-05 06:11:59.284361+00 |
| updated_at | 2025-09-08 06:41:57.337328+00 |
| description | SatLayer Bitcoin Validated Service |
| homepage | https://satlayer.xyz/ |
| repository | https://github.com/satlayer/satlayer-bvs.git |
| max_upload_size | |
| id | 1660231 |
| size | 65,195 |
The BVS Vault CW20 is a specialized vault contract designed to support CW20 tokens as the underlying asset in the SatLayer ecosystem. It enables operators to manage deposits and withdrawals of CW20 tokens, providing a standardized interface for token management.
The Vault CW20 implements the ERC-4626 tokenized vault standard, providing a standardized interface for yield-bearing vaults. It manages the relationship between deposited CW20 tokens and shares, allowing for efficient tracking of user deposits and their corresponding value.
DepositFor: Deposit CW20 tokens into the vault for a recipientQueueWithdrawalTo: Queue a withdrawal request for later processingRedeemWithdrawalTo: Process a queued withdrawal requestShares: Get the number of shares owned by a stakerAssets: Get the asset value of shares owned by a stakerConvertToAssets: Convert a share amount to its asset valueConvertToShares: Convert an asset amount to its share valueTotalShares: Get the total number of shares in the vaultTotalAssets: Get the total asset value in the vaultQueuedWithdrawal: Get information about a queued withdrawalVaultInfo: Get general information about the vaultThe Vault CW20 manages deposits and withdrawals through a share-based system:
The vault implements a withdrawal queue to handle situations where immediate withdrawals are not possible:
QueueWithdrawalToRedeemWithdrawalTo