🧀Fees

This document presents all the fees of the Adrena platform that pass through to token holders.

The platform has:

  • Zero Fees on the following operations:

    • OpenPosition

    • AddCollateral

  • 10 bps (0.1%) fee on the following operations:

    • AddLiquidity (LP) (mint fee)

    • RemoveLiquidity

  • 16 bps (0.16%) fee on the following operations:

    • ClosePosition/Liquidate

  • 0 to .8 bps (0-0.008%) per hour Borrow fee

    • Linear increase based on the current pool utilisation (per Custody, so calculated for each asset independently)

  • 0-200 bps (0-2%)* on Swap fee

    • The actual amount is a function of the distance to the target ratios of the in and out tokens from the pool.

Rent for PDA creation

A few instructions requires the creation of on-chain account controlled by the program on behalf of the user (think a user profile for instance). It's the case for staking, positions, automated order (TP/SL etc.).

Process: I'm going to open a long position, set a take profit, and close the position. I'll follow SOL changed to the user accounts and publish them here. Test carried on devnet with the main program branch [1] Open long position

  • caller paid 0.00304036 SOL, of which 0.00289536 went to pay rent for the Position PDA rent, and so 0.000145 were paid as fees

[2] Add take profit

  • caller paid 0.01570688 SOL, of which 0.01568188 went to pay rent for the TakeProfitThread PDA rent, and so 0.000025 were paid as fees

[3] Close long position

  • caller received 0.01851224 SOL (the full rent amount minus 0.000235 paid as fees for this IX)

In total, 0.01874724 SOL were paid for rent (0.00304036 + 0.01570688 from previous IXs), of which 0.01851224 were refunded, the missing 0.000235 are the actual fees on the "Close long position" IX. The cost on the user for carrying these 3 operations has been 0.000145 + 0.000025 + 0.000235 = 0.000405, which equates to $0.05 at today price

__________

Now, in a Locked Stake scenario :

[1] Lock Stake ADX for 360 days

  • caller paid 0.024073556 SOL, of which 0.024013 went to pay rent for the StakeResolutionThread PDA, and so 0.000060556 were paid as fees

[2] Early Exiting (this was done by professionals, recommend not to try this at home)

  • caller received 0.023968 SOL (the full amount minus 0.000105556 paid as for this IX)

In total, 0.024073556 SOL were paid for rent, of which 0.023968 were refunded, the missing 0.000105556 are the actual fees on the "Close long position" IX. The cost on the user for carrying these 2 operations has been 0.000060556 + 0.000105556 = 0.000166112, which equates to $0.024 at today price

___________

Note that there is an additional "one time cost" that must be paid by anyone who uses staking (liquid, locked, genesis), which is related to setting up the user's StakingAccount that then keep track of all the "sub-stakes". There is currently no option to free this up but it's up to us in the future to implement an IX for it, along wide with other PDA like UserProfile, that would enable an user to wrap up all activity related to the platform and retrieve all rent. In the meantime this rent is safe and linked to your wallet, so it won't go anywhere.

Also note that when the Close long position or Lock Stake Finalize is called through Sablier, the thread will be unable to destroy itself due to reentrancy protection. We will add a mechanism for you to claim any of these dangling thread from the dashboard or just as another chained IX from sablier, we are sorting this out as we speak. But rest assured that each of these dangling thread will keep it's rent, and it's only accessible by our program (and tagged per user) so it will wait safely until we roll this out

Last updated