pub struct EthereumVaultPosition {
pub asset: EthereumVaultPositionAsset,
pub assets_in_vault: String,
pub shares_in_vault: String,
pub total_deposited: String,
pub total_withdrawn: String,
}Expand description
A user’s position in a DeFi vault.
JSON schema
{
"title": "EthereumVaultPosition",
"description": "A user's position in a DeFi vault.",
"examples": [
{
"asset": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC"
},
"assets_in_vault": "1050000",
"shares_in_vault": "1000000000000000000",
"total_deposited": "1000000",
"total_withdrawn": "0"
}
],
"type": "object",
"required": [
"asset",
"assets_in_vault",
"shares_in_vault",
"total_deposited",
"total_withdrawn"
],
"properties": {
"asset": {
"type": "object",
"required": [
"address",
"symbol"
],
"properties": {
"address": {
"description": "Token contract address.",
"type": "string"
},
"symbol": {
"description": "Token symbol (e.g., \"USDC\").",
"type": "string"
}
}
},
"assets_in_vault": {
"description": "Current asset value in the vault (realtime from
ERC4626), in smallest unit.",
"type": "string"
},
"shares_in_vault": {
"description": "Current vault shares held (realtime from
ERC4626).",
"type": "string"
},
"total_deposited": {
"description": "Total amount deposited into the vault, in smallest
unit.",
"type": "string"
},
"total_withdrawn": {
"description": "Total amount withdrawn from the vault, in smallest
unit.",
"type": "string"
}
},
"x-stainless-model": "yield.ethereum_vault_position"
}Fields§
§asset: EthereumVaultPositionAsset§assets_in_vault: StringCurrent asset value in the vault (realtime from ERC4626), in smallest unit.
Current vault shares held (realtime from ERC4626).
total_deposited: StringTotal amount deposited into the vault, in smallest unit.
total_withdrawn: StringTotal amount withdrawn from the vault, in smallest unit.
Trait Implementations§
Source§impl Clone for EthereumVaultPosition
impl Clone for EthereumVaultPosition
Source§fn clone(&self) -> EthereumVaultPosition
fn clone(&self) -> EthereumVaultPosition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EthereumVaultPosition
impl Debug for EthereumVaultPosition
Source§impl<'de> Deserialize<'de> for EthereumVaultPosition
impl<'de> Deserialize<'de> for EthereumVaultPosition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&EthereumVaultPosition> for EthereumVaultPosition
impl From<&EthereumVaultPosition> for EthereumVaultPosition
Source§fn from(value: &EthereumVaultPosition) -> Self
fn from(value: &EthereumVaultPosition) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EthereumVaultPosition
impl RefUnwindSafe for EthereumVaultPosition
impl Send for EthereumVaultPosition
impl Sync for EthereumVaultPosition
impl Unpin for EthereumVaultPosition
impl UnsafeUnpin for EthereumVaultPosition
impl UnwindSafe for EthereumVaultPosition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more