Position accounting vs. Pool accounting

Positions and Ticks, two levels of accounting for funds

The Atlendis protocol has two levels of accounting - Position and Borrower - represent the view of the two main users of the protocol - lenders and borrowers.

Lenders deposit funds by calling the pool smart contract, and receive an NFT representing their position in exchange. The funds within their position can be in several states: deposited (available to be borrowed), borrowed, or in a mixed state (partially borrowed).

The actual composition of a user position can evolve depending on the borrower's actions in the pool. A lender depositing funds into an Atlendis protocol pool can be seen as delegating the management of funds to the borrower, against the payment of interests, at the rate that is chosen by the lender.

When lenders deposit funds, they are then accounted for in the Pool smart contracts, in the target interest rate tick. As explained in the previous section, interest rate ticks are liquidity sub-pools that mutualise lenders' positions.

The borrower, on the other side, has a consolidated view of the ticks, and does not see the individual positions composing them. When a borrower takes a loan against a tick, it borrows the same percentage of every position in that tick.

As such, all positions borrowed at the same time in a given interest rate will see the same proportion of their underlying funds being borrowed.

Example

For example, Alice deposits 60 ETH in the 5% tick of ABC Corp's pool, and Bob deposits 40 ETH in the same tick. If ABC Corp wants to borrow 80 ETH, 48 ETH will be borrowed from Alice's position, leaving 12 ETH deposited on the third-party yield provider, and 32 ETH will be borrowed from Bob's position, leaving 8 ETH deposited on the third-party yield provider. The same principle holds for loans that are spread over several ticks.

The example above can also be represented in a schema, as follows.

Last updated