Composable Attestations
Composable Attestations
Primus' off-chain attestation can be combined with on-chain attestations to meet the specific requirements of decentralized applications (dApps).
In the realm of decentralized finance (DeFi), protocols can establish specific pools with predetermined conditions to cater to authorized users. For example, a user could receive a particular fee discount from a pool created by Uniswap hooks if they provide evidence of their largest swap in Uniswap from Brevis and proof of CEX trading statistics from Primus. To enable this composable attestation scenario, users should be able to submit both off-chain and on-chain attestations through the Primus/Brevis frontend. The pool contract can then access these attestations from a public attestation service like EAS and Verax, allowing any dApps and smart contracts to finely access the attestations. When a user interacts with the DeFi frontend, the pool contract verifies the satisfaction of the pre-conditions based on the on-chain and off-chain attestations before proceeding with the user's transactions.
Hybrid scenarios also arise in non-DeFi contexts. For instance, individuals can provide proofs of humanity to a dApp to resist Sybil attacks. These proofs should be multi-dimensional to mitigate security risks, often including on-chain analytical results, lightweight KYC proof, and even proof of physical identity. Another example involves a GameFi platform that may require users to provide their off-chain gaming data, such as total playing time, along with on-chain trading data in order to incentivize specific user groups with game rewards.
The verification of Primus' off-chain attestations on smart contracts, along with zero-knowledge proofs of users' on-chain behaviors, is crucial for these hybrid use cases. Fortunately, Primus' off-chain attestations and any on-chain attestations from third-parties can be technically decoupled, providing Primus' builders with the flexibility to integrate with all zero-knowledge coprocessors.