MoniBotRouter

The smart contract powering MoniBot's social payments and grants.

The MoniBotRouter is a specialized smart contract that enables social commerce features on the MoniPay protocol. It handles P2P transfers between social handles and manages campaign grant treasuries.

Core Functions

executeP2P

Facilitates transfers between two MoniTags.

  • Logic: If the recipient MoniTag is registered, it transfers funds directly. If not, it moves the funds into an escrow state.

claimSocialPayment

Allows a new user to claim funds that were sent to their social handle before they had a MoniPay account.

  • Logic: Verifies the social handle ownership (via a signed proof from the MoniBot Messenger) and releases the escrowed funds to the user's new wallet.

distributeGrant

Used by MoniBot to award campaign grants.

  • Logic: Transfers funds from a specific campaign treasury to a user's wallet based on the AI's evaluation.

Escrow Mechanism

Social payments are held in the contract for a maximum of 7 days. If the recipient does not claim the funds within this period, the sender can call cancelSocialPayment to retrieve their funds.

Security

  • Proof-of-Social-Ownership: Claims require a cryptographic proof signed by the MoniBot Messenger bot, which verifies the user's social identity.
  • Treasury Isolation: Each campaign has its own isolated treasury, ensuring that one campaign cannot drain funds from another.

The MoniBotRouter is non-upgradeable to ensure that social payments and grants are always handled according to the immutable rules of the protocol.