-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Hello Cryptape, iCKB here 👋
I noticed that Cryptape is re-developing Omnilock to be CoBuild compatible and eventually Cryptape will redeploy the Omnilock. At the same time, the impeding transition to CoBuild and CoBuild OTX has forced me to re-evaluate iCKB from the contracts up.
As per Nervos Talk post, CoBuild, Omnilock and Administrator Mode, I'm evaluating a design based on Omnilock's Administrator Mode for the limit order contract. Briefly, a Limit Order design could use Omnilock as base and be unlocked either:
- By user with signature, as usual.
- Using Administrator Mode with Limit Order Domain Logic included as P2SH.
In this design there are two kind of cells:
Limit Order cell:
- Lock: Omnilock with Domain Logic P2SH Auth Administrator Mode
- Type: sUDT
- Data: [amount, ... limit order data]
Domain Logic cell:
- Lock: Domain Logic to validate limit orders
- Type: ...
Considerations:
- Including Domain Logic as Lock Script is inconvenient, but P2SH auth rules require to use lock script for validation. It would be so much more convenient to include it as Type Script, as the evolution form sUDT to xUDT showed.
- From an OTX CoBuild perspective, the Limit Order cell would be an Action without any matching type script. Then again CoBuild validation rules require all Action objects to have a matching type script in the fully assembled CKB Transaction.
- Limit Orders are just an example from a much broader class of DApps. If Omnilock implements P2SH by type Auth, then a new class of DApps becomes much easier to develop, even in a Cobuild OTX environment. The following cell becomes the only cell needed by both P2SH by type Auth and CoBuild OTX:
Domain Logic cell:
- Lock: ...
- Type: Domain Logic to validate limit orders
Could Cryptape implement P2SH by type Auth in Omnilock as a new Auth flag?
jordanmackXuJiandong
Metadata
Metadata
Assignees
Labels
No labels