Calary: Compliance toolkit empowering killer consumer dApps with on-chain payroll, swaps & rewards.
Prize Pool
Calary is a next-generation developer toolkit that empowers teams to build consumer-grade dApps with robust, on-chain financial features and regulatory compliance baked in. At its core, Calary provides a modular suite of tools that handle end-to-end processes—from user verification and identity management to complex payroll systems and token swaps.
User Onboarding & Compliance:
rewarded
flag (for managing rewards eligibility) are recorded on a native Celo Registry contract.Payroll System:
Calary offers a flexible payroll framework that caters to various business needs:
ICustomPayrollLogic
interface. This interface contains functions for checking eligibility and calculating payment amounts. The vision includes future integration of zk-privacy features to protect sensitive payroll data, making salary distributions transparent yet secure on-chain ().Swap Infrastructure & Incentives:
beforeSwap
hook verifies that the user is compliant (i.e., verified via the registry).afterSwap
hook checks the user's rewarded
flag. If an employee has participated in the payroll system and their flag is set to false (indicating they have claimed their salary), the system mints native Calary tokens. These tokens act as both rewards and credentials, enabling users to redeem perks such as ENS names, event tickets, or merchandise(based on our ecosystem partners). The system resets the flag post-minting to prevent abuse, ensuring that rewards are only granted once per claim cycle.The ultimate goal of Calary is to act as a foundational layer that lets developers build “killer apps” on top of a secure, compliant, and incentivized financial ecosystem. While some of the more advanced features like full zk-privacy integration and decentralized milestone validation are prototyped for future iterations (), the current implementation provides a robust, scalable, and developer-friendly environment to kickstart next-generation consumer applications.
Calary is engineered with a modular, microservices-inspired architecture that ties together state-of-the-art blockchain technologies, smart contract development practices, and modern web frameworks.
Smart Contracts & On-Chain Logic:
Foundry & Solidity: The backbone of Calary is built in Solidity, with development, testing, and deployment handled through Foundry. Contracts are structured to support multiple modules: a Registry contract for user data, distinct payroll contracts (for time-based, custom logic, and milestone-based payrolls), and swap logic contracts integrating Uniswap v4 Hooks.
Registry Contract: This contract manages user compliance by recording wallet addresses, passport expiry dates, and a rewarded
flag. It’s deployed on Celo, ensuring native integration with Celo’s ecosystem.
Payroll Contracts:
ICustomPayrollLogic
interface. This module is designed for flexibility and future zk-privacy integration to protect sensitive data ().Swap Logic with Uniswap v4: Calary integrates Uniswap v4 Hooks to enhance swap functionality. Two custom hooks—beforeSwap
and afterSwap
—ensure that only compliant, verified users participate and that payroll participants are rewarded with Calary tokens. The hooks perform real-time checks on the user's verification status and manage the minting process, resetting the rewarded
flag appropriately.
Off-Chain & Cross-Chain Infrastructure:
Frontend & Backend (Minimal, Just to Prove It Works)
Simple UI with Hardcoded Values: I implemented a minimal frontend that demonstrates how the system works:
depositFunds
, addEmployee
, and claimPayroll
Why So Minimal?
As a solo developer specializing in smart contracts, I opted to hardcode addresses, use basic inputs, and skip advanced design work. The frontend exists purely to show that the system is real and live, not to win a design prize.
Backend: A mock backend using a dummy private key simulates a "gas master" that triggers state-changing functions like claimPayroll
or swap settlement, aligning with the system's intended UX abstraction.