Component: Rate
Description
The Rate contract is the contract for the Takara Lend token, with symbol TKL. It implements the ERC-20 interface itself, without any dependencies. It also tracks delegation and voting. The holder of a token can delegate that token to any address, including themselves, and then that address's voting power is increased by the balance. This delegation is reduced or increased seamlessly when tokens are transferred. Checkpoints are also implemented so that binary search can be conducted to determine any voter's past voting power for any arbitrary block.
Invariants
Typical ERC-20 token invariants should hold, including the correctness of the
totalSupply
across all operations, token-balance conservation across transfers, and so on.A token owner can only increase the voting power of a delegatee; they cannot, through any sequence of token transfers, affect or disrupt the delegatee in any way.
The checkpoint system always correctly reflects the voting-power history of a particular delegatee.
Modifications
No modifications were made to the Rate contract since this is based on the Moonwell's (Well) token.
Test coverage
No tests.
Attack surface
The attack surface is unchanged from the upstream implementation.