> For the complete documentation index, see [llms.txt](https://forforest.gitbook.io/for/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://forforest.gitbook.io/for/technology/44-sumtokontorakuto.md).

# 4.4 スマートコントラクト詳細

#### 【Finance】消費を再生に直結させるCollective Walletに関する技術

消費活動が自動的に森の再生につながる仕組みは、ERC-20規格を拡張したカスタムコントラクトと、分配コントラクトの統合によって実現されます。

1. **ERC3009:** 標準的なERC-20のtransferに加えて、transferWithAuthorization()を実装しています。これにより、ユーザーがオフチェーンで署名した承認データを用いることで、第三者がガス代を負担して送金を実行でき、ガスレス送金やメタトランザクションを可能にします。
2. **Allowlist:** transferやtransferWithAuthorizationなどの関数をつかってトークンのやり取りが出来るウォレットアドレスを制限できる機能をスマートコントラクトに実装しています。これは不特定多数のウォレット間でのトランザクションを防ぐためのものです。
3. **RouterContract:** あらかじめ決められた割合でトークンを分配することができるコントラクトです。ここにプールされた資金は、事前にプログラムされた比率に従い、トラストレスに分配されます。この比率は、後述するガバナンスやEASの検証結果に基づき動的に更新可能です。

#### 【Incentive】持続可能なケア活動を支える交換スコアに関する技術方針

保有資産を減らさずに貨幣の流通速度（Velocity）を高めるため、「Reputation Decay Algorithm（評判減衰アルゴリズム）」がコードレベルで実装されています。

1. **Transparent Rank Calcuration:** 全ユーザーのランクを毎ブロック更新するのはガス代の観点から非現実的であるため、トランザクションに加えて計算式をオンチェーン化することで、透明性のあるランク計算ができるようにしています。
2. **Decay Formula (減衰数式):** ユーザーのランクスコア は、最終活動時刻から現在時刻までの経過時間 に応じて減衰します。例えば「30日でランクが半減する」ように設定される減衰係数は、コミュニティのガバナンスで決定します。
   * 今回の取引によって加算されるスコア（取引相手の多様性や、ケア活動への参加度で加重）。
3. **Tiered Benefits (動的インセンティブ):** 算出されたスコアに基づき、ユーザーのステータスを5段階で決定します。

#### 【Communication】繋がりを生み出すメディア機能に関する技術

通貨を単なる数値データから「文脈を運ぶメディア」へと進化させるため、Ethereum Attestation Service (EAS) と連携したトランザクション構造を実装しています。

1. **Attestation-linked Transfer:**&#x30C8;ークンの転送と同時に、その行為の意味（コンテキスト）をオンチェーンに刻むため、EASのスキーマを活用します。
   * **Schema Definition:** `uid: bytes32`, `actionType: string`, `message: string`, `location: string`
   * **Transaction Flow:** 例えば、ユーザーがアプリで「間伐材コップを購入」して決済する際、バックグラウンドで以下の2つがアトミック（不可分）に実行されます。
     1. **Payment:** FoRトークンの送金。
     2. **Attestation:** 「誰が、どこで、何のケアのために」使ったかという証明書（Attestation）の発行。
2. **Context Explorer:** 単なる取引履歴（Tx Hash）ではなく、このAttestationを参照して「物語のタイムライン」を表示します。これにより、通貨の流通経路が「感謝とケアの連鎖」として可視化され、ユーザーに行動変容を促します。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://forforest.gitbook.io/for/technology/44-sumtokontorakuto.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
