Velvet Capital: strategy deposit flow #869
Labels
enhancement
New feature or request
priority: P1
An important issue that must be fixed before the next release, but does nto require immediate focus.
size: M
An ordinary task that can be completed in a few days or in a week
Goal
As a web visitor seeking to deposit funds into a strategy that uses a Velvet Capital vault, I want a usable and secure deposit flow that enables me to deposit funds in a denomination currency (e.g., USDC, USDT) and receive, in exchange, an appropriate amount of tokens representing shares of the strategy.
Example deposit
Here's an example deposit flow for ETH-BTC long swing using an Enzyme vault:
ETH-BTC.long.swing.deposit.mp4
Acceptance criteria
Given
on_chain_data.asset_management_mode
set to "velvet_capital"on_chain_data.smart_contracts
includes the following properties with valid blockchain addresses:denomination_token
vault
portfolio
deposit_manager
metadata
, the denomination token is identified and displayed to the user on the introduction screen (e.g., USDT, USDC)approve
request is initiated in the user's wallet on the denomination token, approving transfer to an appropriatespender
contract address associated with the vault, for the amount that the user specified for their depositAdditional code quality acceptance criterion
Questions
1. How do we identify the denomination token?
Per @miohtama:
This address should be included in the
smart_contracts
of the strategy'smetadata
.2. How is the share value (relative to USDC) determined?
See AC 2 above, second bullet.
Examining the estimation process in the purchase flow on Velvet Capital's own site, this is done through an Enso API.
Sample API call:
Velvet UI appears to make above request for every single token asset held in the vault.
Q: where does the UI get the list of tokens held by the vault?
NOTE: may be able to use simpler
quote
API instead ofroute
3. How do we identify the
spender
contract address?See AC 4 above.
See code referenced in question 4 below.
The
spender
for anapprove
orallowance
ERC-20 call should be the Velvetdeposit_manager
address for a given chain.On Base this is: 0xe4e23120a38c4348D7e22Ab23976Fa0c4Bf6e2ED
This address should be included in the
smart_contracts
of the strategy'smetadata
.4. How do we initiate vault deposit transaction?
See AC 5 above.
Per @miohtama:
See Velvet Deposit Portfolio API documentation
The text was updated successfully, but these errors were encountered: