Legacy architecture. Mellow Points is an earlier generation of Mellow vault infrastructure, documented for existing deployments. Core Vaults are Mellow’s current vault architecture.
DeFi Integrations
Get contracts
Async function to load contracts holding LRTs on behalf of users.Get user shares
Async function to load user shares between 2 blocks (inclusive). This function is called for all contracts returned bygetContracts.
| chainId | block | user | amount | vault | protocol_address |
|---|---|---|---|---|---|
| 1 | 1 | 0x01 | 100 | 0x0 | 0x0 |
| 1 | 1 | 0x02 | 200 | 0x0 | 0x0 |
| 1 | 1 | 0x03 | 50 | 0x0 | 0x0 |
| 1 | 3 | 0x03 | 20 | 0x0 | 0x0 |
| 1 | 4 | 0x01 | 150 | 0x0 | 0x0 |
| 1 | 5 | 0x02 | 0 | 0x0 | 0x0 |
- At block 1,
0x01owns ~28% of the user shares (100 / (100 + 200 + 50)),0x02owns ~57% and0x03owns ~14%. - At block 3,
0x03underlying LRT balance changed, he now owns ~6% of the user shares (20 / (100 + 200 + 20)), while0x01owns ~31% and0x02owns ~62%. - At block 5,
0x02withdrew all his funds from the protocol, he now owns 0% of the user shares, while0x01owns ~88.2% (150 / (150 + 20)) and0x03owns ~11.8% (20 / (150 + 20)).
Get user balances (optional)
Optional async function to load user balances (if they’re not 1:1 to user shares). This function is called for all contracts returned bygetContracts.