Skip to content

Updated 3Crv Convex vault symbols and names #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ cd valueFlows
npx puml generate musdValueFlows.puml -o musdValueFlows.png
npx puml generate musdPolygonValueFlows.puml -o musdPolygonValueFlows.png
npx puml generate convexFlows.puml -o convexFlows.png

cd vaults
npx puml generate convex3CrvDependencies.puml -o convex3CrvDependencies.png
npx puml generate convex3CrvContracts.puml -o convex3CrvContracts.png
```

### VS Code extension
Expand Down
25 changes: 25 additions & 0 deletions batchor/batchor-value-flow.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@startuml

title "Batchor Value Flow"

box L2
actor "Shareholder" as sh
participant "L2 Batchor" as l2b <<mStable>>
end box

participant "Bridge" as bg <<Bridge>>

box Mainnet
participant "X-Chain\nBatchor" as mb <<mStable>>
participant "Mainnet\nVault" as v <<mStable>>
end box


sh -> l2b : assets
l2b -> bg : assets
bg -> mb : assets
mb -> v : assets
v -> mb : shares
mb -> bg : shares
bg -> l2b : shares
l2b -> sh : shares
Binary file added batchor/cross-chain-batchor-polygon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 119 additions & 0 deletions batchor/cross-chain-batchor-polygon.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
@startuml

title "Cross-chain batchor"

box Polygon
actor "Depsitor" as d
actor "Withdrawer" as w
participant "L2 Batchor" as l2b <<mStable>>
participant "Child Asset" as l2a <<Polygon>>
participant "Child Vault" as l2v <<Polygon>>
participant "Child Chain\nManager" as l2bg <<Polygon>>
end box

actor "Orchestrator" as or
participant "Bridge" as bg <<Polygon>>

box Mainnet
participant "Root Chain\nManager" as rcm <<Polygon>>
participant "Batchor" as mb <<mStable>>
participant "Asset" as a <<3rd Party>>
participant "Vault" as v <<mStable>>
end box


... Depositor deposits assets ...

d -> l2b : deposit (Child Asset, assets)
activate l2b
l2b -> l2a : transferFrom(\nDepositor,\nL2 Batchor,\nassets)
activate l2a
return
return epoch

... Withdrawer requests redeem of shares for asssets ...

w -> l2b : redeem (Child Vault, shares)
activate l2b
l2b -> l2v : transferFrom(\nWithdrawer,\nL2 Batchor,\nshares)
activate l2v
return
return epoch

... Orchestrator settles deposited assets and withdraw requests when deposits > withdraws ...

or -> l2b : settle(epoch)
activate l2b
l2b -> l2b : net deposits\nand withdraws
l2b -> l2a : withdraw(assets)
activate l2a
note left : burns the Child Assets\nheld by the L2 Batchor
return
loop Withdrawers
l2b -> l2a : transfer(Withdrawer, assets)
note left : transfer assets\nfrom L2 Batchor\nto Withdrawer
activate l2a
return
end
return proof of burn inputs

... Bridge checkpoints burn transaction ...

... Orchestrator claims assets from the bridge and deposits into mainnet vault ...

or -> mb : settle(proof of burn)
activate mb
mb -> rcm : exit(proof of burn)
activate rcm
rcm -> a : transferFrom(\nBridge,\nBatchor,\nassets)
activate a
return
return
mb -> v : deposit(assets, Batchor)
activate v
v -> a : transferFrom(\nBatchor,\nassets)
activate a
return
v -> v : mint(\nBatchor,\nshares)
return shares
mb -> rcm : depositFor(\nL2 Batchor,\nVault,\nshares)
activate rcm
rcm -> v : transferFrom (\nBatchor,\nRoot Chain Manager,\nshares)
activate v
return
return
return shares

... Bridge mints vault shares on L2 ...

bg -> l2v : mint(L2 Batchor, shares)
activate l2v
return


... Orchestrator transfers vault shares across the bridge to the L2 batchor ...

or -> l2b : settle(epoch)
activate l2b
l2b -> l2b : net vault shares
note left : vault shares from withdraw\nand new mainnet deposit
l2b -> l2b : calc shares per asset
loop Depositors
l2b -> l2v : transfer(\nDepositer, shares)
note left : transfer assets\nfrom L2 Batchor\nto Depositer
activate l2v
return
end
return

' ... Depositor claims shares ...

' w -> l2b : claim()
' activate l2b
' l2b -> l2v : transfer(\nDepositor,\nshares)
' activate l2v
' return
' return shares


@enduml
64 changes: 64 additions & 0 deletions vaults/convex3CrvContracts.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
@startuml

title "Mainnet 3Pool Convex Meta Vault Contracts"

' object "Curve3CrvMetaVault" as mv1 <<mStable>> {
' asset: DAI
' symbol: mvDAI-3PCV
' name: DAI 3Pool Convex Meta Vault
' address: TBD
' }

object "Curve3CrvMetaVault" as mv2 <<mStable>> {
asset: USDC
symbol: mvUSDC-3PCV
name: USDC 3Pool Convex Meta Vault
address: 0x455fB969dC06c4Aa77e7db3f0686CC05164436d2
}

' object "Curve3CrvMetaVault" as mv3 <<mStable>> {
' asset: USDT
' symbol: mvUSDT-3PCV
' name: USDT 3Pool Convex Meta Vault
' address: TBD
' }

object "PeriodicAllocationPerfFeeMetaVault" as mv4 <<mStable>> {
asset: 3Crv
symbol: mv3CRV-CVX
name: 3CRV Convex Meta Vault
address: 0x9614a4C61E45575b56c7e0251f63DCDe797d93C5
}

object "Convex3CrvLiquidatorVault" as bv1 <<mStable>> {
asset: 3Crv
symbol: vcx3CRV-FRAX
name: 3CRV Convex FRAX Vault
address: 0x98c5910823C2E67d54e4e0C03de44043DbfA7ca8
}

object "Convex3CrvLiquidatorVault" as bv2 <<mStable>> {
asset: 3Crv
symbol: vcx3CRV-mUSD
name: 3Crv Convex mUSD Vault
address: 0xB9B47E72819934d7A5d60Bf08cD2C78072383EBb
}

object "Convex3CrvLiquidatorVault" as bv3 <<mStable>> {
asset: 3Crv
symbol: vcx3CRV-BUSD
name: 3Crv Convex BUSD Vault
address: 0x87Ed92648fAE3b3930577c92c8A247b127ED8949
}

' mv1 ..> mv4
mv2 ..> mv4
' mv3 ..> mv4

mv4 ..> bv1
mv4 ..> bv2
mv4 ..> bv3
' mv4 ..> bv4
' mv4 ..> bv5

@enduml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
@startuml

title "Save+ Contract Dependencies"
title "3Pool Convex Meta Vault Dependencies"

object "Curve3CrvMetaVault" as mv1 <<mStable>> {
asset: DAI
symbol: 3pDAI
name: 3Pooler Meta Vault (DAI)
symbol: mvDAI-3PCV
name: DAI 3Pool Convex Meta Vault
}

object "Curve3CrvMetaVault" as mv2 <<mStable>> {
asset: USDC
symbol: 3pUSDC
name: 3Pooler Meta Vault (USDC)
symbol: mvUSDC-3PCV
name: USDC 3Pool Convex Meta Vault
}

object "Curve3CrvMetaVault" as mv3 <<mStable>> {
asset: USDT
symbol: 3pUSDT
name: 3Pooler Meta Vault (USDT)
symbol: mvUSDT-3PCV
name: USDT 3Pool Convex Meta Vault
}

object "PeriodicAllocationPerfFeeMetaVault" as mv4 <<mStable>> {
asset: 3Crv
symbol: mv3CRV
symbol: mv3CRV-CVX
name: 3CRV Convex Meta Vault
}

Expand All @@ -44,11 +44,11 @@ object "Convex3CrvLiquidatorVault" as bv3 <<mStable>> {
name: 3Crv Convex BUSD Vault
}

object "Convex3CrvLiquidatorVault" as bv4 <<mStable>> {
asset: 3Crv
symbol: vcx3CRV-LUSD
name: 3Crv Convex LUSD Vault
}
' object "Convex3CrvLiquidatorVault" as bv4 <<mStable>> {
' asset: 3Crv
' symbol: vcx3CRV-LUSD
' name: 3Crv Convex LUSD Vault
' }

' class "Convex3CrvLiquidatorVault" as bv5 <<mStable>> {
' asset: 3Crv
Expand Down Expand Up @@ -89,11 +89,11 @@ object "BUSD+3Crv" as busd3Crv <<Curve>> #LightCyan {
lp token: cvxBUSD3CRV-f
}

object "LUSD+3Crv" as lusd3Crv <<Curve>> #LightCyan {
' pool: USDP+3Crv
assets: LUSD, 3Crv
lp token: LUSD3CRV-f
}
' object "LUSD+3Crv" as lusd3Crv <<Curve>> #LightCyan {
' ' pool: USDP+3Crv
' assets: LUSD, 3Crv
' lp token: LUSD3CRV-f
' }

object "FRAX+3Crv" as cvx1 <<Convex>> #Thistle {
' pool: FRAX+3Crv
Expand All @@ -113,11 +113,11 @@ object "BUSD+3Crv" as cvx3 <<Convex>> #Thistle {
lp token: cvxBUSD3CRV-f
}

object "LUSD+3Crv" as cvx4 <<Convex>> #Thistle {
' pool: USDP+3Crv
asset: LUSD3CRV-f
lp token: cvxLUSD3CRV-f
}
' object "LUSD+3Crv" as cvx4 <<Convex>> #Thistle {
' ' pool: USDP+3Crv
' asset: LUSD3CRV-f
' lp token: cvxLUSD3CRV-f
' }

' object "sUSD+3Crv" as cvx5 <<Convex>> #Thistle {
' ' pool: USDP+3Crv
Expand All @@ -137,9 +137,9 @@ object "BUSD Gauge" as cg3 <<Curve>> #LightCyan {
asset: BUSD3CRV-f
}

object "LUSD Gauge" as cg4 <<Curve>> #LightCyan {
asset: LUSD3CRV-f
}
' object "LUSD Gauge" as cg4 <<Curve>> #LightCyan {
' asset: LUSD3CRV-f
' }

' object "sUSD Gauge" as cg5 <<Curve>> #LightCyan {
' asset: crvPlain3andSUSD
Expand All @@ -158,49 +158,49 @@ mv3 ..> mv4
mv4 ..> bv1
mv4 ..> bv2
mv4 ..> bv3
mv4 ..> bv4
' mv4 ..> bv4
' mv4 ..> bv5

bv1 <..> l
bv2 <..> l
bv3 <..> l
bv4 <..> l
' bv4 <..> l
' bv5 <..> al

bv1 ....> cvx1
bv2 ....> cvx2
bv3 ....> cvx3
bv4 ....> cvx4
' bv4 ....> cvx4
' bv5 ...> cvx5

bv1 ...> frax3Crv
bv2 ...> musd3Crv
bv3 ...> busd3Crv
bv4 ...> lusd3Crv
' bv4 ...> lusd3Crv
' bv5 ...> sUSD3Crv

3p <.. bv1
3p <.. bv2
3p <.. bv3
3p <.. bv4
' 3p <.. bv4
' 3p <.. bv5

cvx1 ..> cg1
cvx2 ..> cg2
cvx3 ..> cg3
cvx4 ..> cg4
' cvx4 ..> cg4
' cvx5 ..> cg5

frax3Crv <... cg1
musd3Crv <... cg2
busd3Crv <... cg3
lusd3Crv <... cg4
' lusd3Crv <... cg4
' sUSD3Crv <... cg5

frax3Crv <.. cvx1
musd3Crv <.. cvx2
busd3Crv <.. cvx3
lusd3Crv <.. cvx4
' lusd3Crv <.. cvx4
' sUSD3Crv <... cvx5

l <.> css
Expand Down
Loading