-
Notifications
You must be signed in to change notification settings - Fork 9
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
Enhance the cross domain DvP flow for consumability #473
Labels
enhancement
New feature or request
Comments
Mostly based on
Setup the Bond contractssequenceDiagram
box Bond Issuer Paladin
actor Bond issuer
participant Noto domain (issuer)
participant Pente domain (issuer)
participant Bond tracking contract (issuer)
end
box Bond Custodian Paladin
actor Bond custodian
participant Noto domain (custodian)
participant Pente domain (custodian)
participant Bond tracking contract (custodian)
end
box Investor Paladin
participant Noto domain (investor)
end
box Base EVM ledger
participant Noto contract
participant Pente contract
participant Bond public contract
end
par Create issuer+custodian privacy group
Pente domain (issuer)->>Pente domain (custodian): create privacy group & agree on endorsement policy
Pente domain (custodian)->>Pente domain (issuer): acknowledge
Pente domain (issuer)->>Pente contract: deploy issuer+custodian privacy group
Pente contract-->>Pente domain (custodian): deploy event indexed
end
par Create bond tracker contract
Bond issuer->>Bond public contract: deploy
Bond issuer->>Bond tracking contract (issuer): deploy private tracker contract
Bond issuer->>Bond tracking contract (custodian): deploy private tracker contract
end
par Deploy Noto Bond token
Bond issuer->>Noto domain (issuer): deploy Noto token contract
Noto domain (issuer)->>Noto contract: deploy
Noto contract-->>Noto domain (custodian): deploy event indexed
Noto contract-->>Noto domain (investor): deploy event indexed
end
|
Setup the Cash contractssequenceDiagram
box Bond Custodian Paladin
actor Bond custodian
participant Zeto domain (custodian)
end
box Bank Paladin
actor Bank
participant Zeto domain (bank)
end
box Investor Paladin
actor Bond investor
participant Zeto domain (investor)
end
box Base EVM ledger
participant Zeto contract
end
par Deploy Zeto cash token
Bank->>Zeto domain (bank): deploy Zeto token contract
Zeto domain (bank)->>Zeto contract: deploy
Zeto contract-->>Zeto domain (investor): deploy event indexed
Zeto contract-->>Zeto domain (custodian): deploy event indexed
end
|
Issue Bond and CashsequenceDiagram
box Bond Issuer Paladin
actor Bond issuer
participant Noto domain (issuer)
end
box Bond Custodian Paladin
actor Bond custodian
participant Noto domain (custodian)
participant Zeto domain (custodian)
end
box Bank Paladin
actor Bank
participant Zeto domain (bank)
end
box Investor Paladin
actor Bond investor
participant Noto domain (investor)
participant Zeto domain (investor)
end
box Base EVM ledger
participant Noto contract
participant Zeto contract
end
par Issue bond
Bond issuer->>Noto domain (issuer): Issue bond
Noto domain (issuer)->>Noto contract: mint()
Noto domain (issuer)->>Noto domain (custodian): send secrets for the minted tokens
Noto contract-->>Noto domain (custodian): noto asset tokens event indexed
activate Noto domain (custodian)
Noto contract-->>Noto domain (investor): noto asset tokens event indexed
Noto domain (custodian)->>Noto domain (custodian): compare secrets vs. hashes in the event
Noto domain (custodian)->>Noto domain (custodian): save token private states
deactivate Noto domain (custodian)
end
par Issue cash
Bank->>Zeto domain (bank): Issue cash
Zeto domain (bank)->>Zeto contract: mint()
Zeto domain (bank)->>Zeto domain (investor): share secrets for the minted tokens
activate Zeto domain (investor)
Zeto contract-->>Zeto domain (investor): zeto payment tokens event indexed
Zeto contract-->>Zeto domain (custodian): zeto payment tokens event indexed
Zeto domain (investor)->>Zeto domain (investor): compare secrets vs. hashes in the event
Zeto domain (investor)->>Zeto domain (investor): save token private states
deactivate Zeto domain (investor)
end
|
Setup Bond subscription b/w investor and custodiansequenceDiagram
box Bond Custodian Paladin
actor Bond custodian
participant Pente domain (custodian)
participant Bond subscription contract (custodian)
end
box Investor Paladin
actor Bond investor
participant Bond subscription contract (investor)
participant Pente domain (investor)
end
box Base EVM ledger
participant Pente contract
end
par Create investor+custodian privacy group
Pente domain (investor)->>Pente domain (custodian): create privacy group & agree on endorsement policy
Pente domain (custodian)->>Pente domain (investor): acknowledge
Pente domain (investor)->>Pente contract: deploy<br/>investor+custodian<br/>privacy group
Pente contract-->>Pente domain (custodian): deploy event indexed
end
par Create bond subscription contract
Bond custodian->>Bond subscription contract (investor): deploy bond subscription contract
Bond custodian->>Bond subscription contract (custodian): deploy bond subscription contract
end
|
Propose payment and bond transferssequenceDiagram
box Bond Custodian Paladin
actor Bond custodian
participant Noto domain (custodian)
participant Pente domain (custodian)
participant Bond subscription contract (custodian)
end
box Investor Paladin
actor Bond investor
participant Zeto domain (investor)
participant Bond subscription contract (investor)
end
box Base EVM ledger
participant Noto contract
participant Zeto contract
participant Pente contract
participant Atom contract
end
par propose trade: payment transfer
Zeto domain (investor)-->>Zeto contract: prepare payment transfer
Zeto domain (investor)->>Zeto domain (investor): prepare payment transfer
Zeto domain (investor)->>Bond subscription contract (investor): set prepared payment transfer
Zeto domain (investor)->>Bond subscription contract (custodian): set prepared payment transfer
activate Bond subscription contract (custodian)
Bond subscription contract (custodian)->>Zeto contract: lock proof via emitted PenteExternalCall
end
par propose trade: bond transfer
Noto domain (custodian)-->>Pente contract: prepare bond transfer
Noto domain (custodian)->>Noto domain (custodian): prepare bond transfer
Noto domain (custodian)->>Bond subscription contract (custodian): set prepared bond transfer
Noto domain (custodian)->>Bond subscription contract (investor): set prepared bond transfer
Bond subscription contract (custodian)-->>Pente domain (custodian): external call event<br/>to lock Noto states
Pente domain (custodian)->>Noto contract: lock Noto states with custodian as delegate
end
par approve trade
Bond custodian->>Bond subscription contract (custodian): distribute
Bond subscription contract (custodian)-->>Pente domain (custodian): external call event<br/>to deploy Atom
deactivate Bond subscription contract (custodian)
Pente domain (custodian)->>Atom contract: deploy Atom contract with prepared payment and bond transfers
end
|
Execute tradesequenceDiagram
box Bond Custodian Paladin
actor Bond custodian
participant Pente domain (custodian)
participant Zeto domain (custodian)
end
box Investor Paladin
actor Bond investor
participant Zeto domain (investor)
end
box Base EVM ledger
participant Noto contract
participant Zeto contract
participant Pente contract
participant Atom contract
end
par appove trade: payment transfer
Zeto domain (custodian)->>Zeto contract: move states lock to the Atom contract
end
par approve trade: bond transfer
Pente domain (custodian)->>Pente contract: move states lock to the Atom contract
end
par execute trade atomically
Atom contract->>Noto contract: execute bond transfer
Atom contract->>Zeto contract: execute payment transfer
end
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What would you like to be added?
Discussing with @awrichar, the Bond example (a DvP scenario) is very complex, we want to see if it can be enhanced to be more consumable.
Why is this needed?
Also need to add Zeto to the flow, or create another flow that incorporates Zeto for payment.
The text was updated successfully, but these errors were encountered: