# Integration contract

## Introduction

The integration contract will be deployed by Kiln, but then owned and operated by our partner.  This provides partners with complete control over the user experience and the staking product being distributed to their end users.

## What can be configured in the contract?

Partners can do the following:

<details>

<summary><strong>modify the end user fee</strong></summary>

Also referred to as a commission. Programmatically deducted fee from total staking rewards only. The fee can be updated at any time by our partner.

</details>

<details>

<summary><strong>modify commission split</strong>:</summary>

The admin of the contract can call `changeSplit()` and specify the recipients (wallets) and their corresponding commission percentages in basis points. \
\
e.g. where the end-user fee is 15%, with a 60/40% commission split, Wallet1 gets 9%, and Wallet2 gets 6% as commission, the call would be :\
\
changeSplit(\[wallet1,wallet2],\[6000,4000])

</details>

<details>

<summary><strong>modify staking weighting across multiple node operators</strong></summary>

When linked to multiple operator pools, tailor your staked ETH distribution per pool. Set ratios like 80/20 for Operator1/Operator2, and the smart contract self-adjusts with incoming deposits. Easily modify these ratios, and the contract rebalances as ETH is staked or exited.

</details>

<details>

<summary><strong>pause deposits</strong></summary>

Pause the contract to prevent further deposits being made.

</details>

<details>

<summary><strong>modify admin roles</strong></summary>

There are two admin roles required to operate the smart contracts.  These roles are owned, and can be changed, by the partner at any time.

</details>

<details>

<summary><strong>upgrade the contract</strong></summary>

When upgrades become available, Kiln will provide instructions for the upgrade. Notably, the actual upgrade can only be executed by the partner, utilizing one of the configured admins.

</details>

## Token definition

Users receive a receipt token representing their staked position. Partners must decide on the token type upfront (soulbound or liquid), as it cannot be set or changed later. Kiln deploys the correct integration contract based on this initial decision.

### Token attributes

Partners can customise the below token attributes. Both attributes will be displayed on Etherscan and ERC20 compatible interfaces:

* <mark style="background-color:orange;">**token symbol:**</mark>  e.g. cbETH, cdcETH, psETH
* <mark style="background-color:orange;">**token name**</mark><mark style="background-color:orange;">:</mark>  e.g. Pooled Staked ETH, Coinbase Wallet ETH

### Token types

Partners need to choose the token type they wish to include in the staking product being offered to their end users.&#x20;

Below is a comparison and summary of token types, highlighting differences in integration approaches, capabilities, and end-user experiences.

**NOTE**: *Commonly, start with Native20 (non-transferrable tokens). Consider an optional upgrade to Liquid20 later; connect with us for details on the upgrade path and associated considerations.*

<table><thead><tr><th width="184">Feature</th><th width="121" align="center">Native20</th><th width="111" align="center">Liquid20A</th><th width="117" align="center">Liquid20C</th></tr></thead><tbody><tr><td>Stake any amount</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td>Commission taken onchain</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td>Multi commission recipients</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td>Users chooses pool</td><td align="center">❌</td><td align="center">❌</td><td align="center">❌</td></tr><tr><td>Partner chooses pool (sets % distribution across pools)</td><td align="center">✅</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td>Transfers</td><td align="center">❌</td><td align="center">✅</td><td align="center">✅</td></tr><tr><td><em>NOTES</em></td><td align="center"></td><td align="center"><em>aToken</em></td><td align="center"><em>cToken</em></td></tr></tbody></table>

#### **Native20**&#x20;

* contract expose the exact same view methods as `Liquid20C`
* without the `transfer` and `approve` methods. It looks like a token, but cannot behave like one.

<figure><img src="https://1911902555-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fnye3yqpuOzdfrtWAlwng%2Fuploads%2Fk3VSBcYkE6kIcjja3Hqi%2Fimage.png?alt=media&#x26;token=cf70d6bd-2d25-4f27-8dea-1096e2fe46ec" alt="" width="375"><figcaption><p>example view of Native20 token in Etherscan</p></figcaption></figure>

**Liquid20A**&#x20;

* an `ERC20` rebase token.&#x20;
* the quantity of tokens held in the users wallet will increase each time rewards are distributed. Rebase tokens maintain a fixed exchange rate but the quantity of tokens issued increases to reflect earned rewards.&#x20;

**Liquid20C**&#x20;

* &#x20;standard `ERC20` token
* The quantity of tokens held in the users wallet do not change, however their value increases each time rewards are distributed.

##

## Contract Parameters

### 20 type Configuration

<table><thead><tr><th width="239.33333333333331">Parameter</th><th width="137"></th><th>Description</th></tr></thead><tbody><tr><td>admin</td><td>address</td><td>Admin wallet address</td></tr><tr><td>pools</td><td>address[]</td><td>List of pool addresses</td></tr><tr><td>poolFees</td><td>uint256[]</td><td>List of fee for each pool in basis points</td></tr><tr><td>poolPercentages</td><td>uint256[]</td><td>Share of new stake to go to each pool, in basis points, must add up to 10 000</td></tr><tr><td>commissionRecipients</td><td>address[]</td><td>List of address of commission beneficiaries</td></tr><tr><td>commissionDistribution</td><td>uint256[]</td><td>Share of each beneficiary, in basis points, must add up to 10 000</td></tr><tr><td>name</td><td>string</td><td>ERC-20 style display name</td></tr><tr><td>symbol</td><td>string</td><td>ERC-20 style display symbol</td></tr></tbody></table>
