Overview

This document describes the architecture and fail-safe mechanisms of the Reward Distributor Contract, which employs Gnosis Safe for the secure storage of tokens. The contract is engineered for secure and transparent reward distributions and incorporates multiple fail-safe measures to pause the program and notify users under particular conditions.

Table of Contents

  1. Overview
  2. Functionality Description
  3. Fail-Safe Mechanisms
  4. Security Measures

Functionality Description

getClaimPayload Function

Signature:


function getClaimPayload(uint256 tokenId, TxnPayload memory payload) public view returns (AttestClaim memory);

Description:

The getClaimPayload function calculates the reward amount a user is eligible to withdraw based on their tokenId and a given transaction payload (TxnPayload).

Features:

Workflow:

  1. Mercle calls the function with the requisite transaction list to generate the payload.
  2. The contract computes the rewards and returns an AttestClaim object.