> ## Documentation Index
> Fetch the complete documentation index at: https://0xcaptain.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Lock ABNK for veABNK voting power and fee rewards

> Lock ABNK tokens for up to 4 years to receive veABNK. veABNK gives you governance voting power and a weekly share of 80% of AgentBank protocol fees.

veABNK (vote-escrowed ABNK) is a non-transferable balance you receive when you lock ABNK tokens. It grants governance voting power and entitles you to a weekly distribution of 80% of protocol revenue. The longer you lock, the more veABNK you receive.

## Lock parameters

| Parameter | Value |
| - | - |
| Minimum lock | 7 days |
| Maximum lock | 4 years (1,461 days) |
| Voting power formula | `amount × timeRemaining / MAX_LOCK` |
| Decay | Linear — voting power declines toward zero as lock expires |
| Early unlock | Not supported |
| Delegation | Supported (delegate without transferring lock) |

## Voting power examples

```
Lock 10,000 ABNK for 4 years → 10,000 veABNK (maximum)
Lock 10,000 ABNK for 2 years →  5,000 veABNK
Lock 10,000 ABNK for 1 year  →  2,500 veABNK
Lock 10,000 ABNK for 7 days  →     19 veABNK (minimum meaningful)
```

Voting power decays continuously:

```
votingPower(t) = lockedAmount × max(0, lockEnd − t) / MAX_LOCK
```

You can extend your lock at any time to restore full voting power without unlocking.

## Lock ABNK

To create a veABNK position, call `createLock` on the `VotingEscrow` contract:

```
VotingEscrow: 0x06649c4a2194eE9736c2139AAFE6D10033154F9a
```

Using ethers.js or viem, call:

```solidity theme={null}
VotingEscrow.createLock(uint256 amount, uint256 unlockTime)
```

* `amount`: ABNK in wei
* `unlockTime`: Unix timestamp of lock expiry (must be 7 days–4 years from now)

> [!NOTE]
>
> Approve the `VotingEscrow` contract to spend your ABNK before calling `createLock`.

## Claim fees

veABNK holders claim accumulated protocol fees weekly from the `FeeDistributor`:

```
FeeDistributor: 0x16c65fbe4220F0D0EC7cbB47Ad9B2956DbA9886d
```

Your claimable amount:

```
claimable(user) = totalFeesThisEpoch × user.veABNK / totalVeABNK
```

Unclaimed fees roll over — they never expire.

## Delegate voting power

You can delegate your veABNK voting power to another address without unlocking or transferring your ABNK:

```solidity theme={null}
ABNKToken.delegate(address delegatee)
```

Delegation is useful for custodial wallets, DAO-to-DAO governance, or vote aggregation.

## Governance actions

With veABNK you can vote on:

* Adjusting vault parameters (fee rates, drawdown limits, auction duration)
* Approving new TEE code hashes for agent execution
* Directing treasury funds
* Activating/deactivating the fee switch (51% threshold)
* Emergency circuit breaker activation (67% supermajority)

All governance changes go through a **7-day timelock** before execution.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.