follow us on twitter . like us on facebook . follow us on instagram . subscribe to our youtube channel . announcements on telegram channel . ask urgent question ONLY . Subscribe to our reddit . Altcoins Talks Shop Shop


This is an Ad. Advertised sites are not endorsement by our Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise Here Ads bidding Bidding Open

Author Topic: Magnety protocol  (Read 567 times)

Offline 0406Antoxa1982

  • Hero Member
  • *
  • Activity: 1010
  • points:
    9310
  • Karma: 26
  • https://t.me/KryptoSiaman
  • Trade Count: (0)
  • Referrals: 28
  • Last Active: December 21, 2023, 03:29:41 PM
    • View Profile

  • Total Badges: 22
    Badges: (View All)
    Fifth year Anniversary Fourth year Anniversary 1000 Posts
Magnety protocol
« on: August 23, 2022, 12:59:03 PM »
Magnety Community events



In addition to our upcoming Beta Testnet launch, we are delighted to announce that the Magnety team is now fully staffed!

Many community events will take place over the next few weeks to celebrate!

The first one starts this Sunday and takes the form of a series of quizzes about Magnety. Indeed, even if it is a mandatory step for an investor, we know it is sometimes boring to read a project’s documentation. That’s why we propose to do it playfully. The goal is to provide you with all the information you need for our future launch. Of course, some rewards are planned for the most diligent members!


How it works:

Initially, four quizzes are planned according to the following schedule:

*  Quiz 1 from Sunday 14/08 to Wednesday 17/08

*  Quiz 2 from Thursday 18/08 to Sunday 21/08

*  Quiz 3 from Monday 22/08 to Thursday 25/08

*  Quiz 4 from Friday 26/08 to Monday 29/08


Each quiz includes a series of five questions with four possible answers.

You can find all the necessary information on the following links:

Website: https://www.magnety.finance

Twitter: https://twitter.com/magnetyfi

Educational Twitter: https://twitter.com/MagnetyIntern

Medium: https://medium.com/@magnety.finance

Discord: https://discord.gg/7Jrm8GUS3F

White Paper: https://www.magnety.finance/static/media/WhitePaper_1_0.31f8791cdb00c9ec255e.pdf

Notion: https://magnety.notion.site/magnety/Magnety-538f55a2ee1d4a39b8ed2141beb5e383


Rewards :

In addition to informing you about Magnety, it will be possible for each participant to win an OAT. An OAT (On-chain Achievement Token provided by Project Galaxy) is an NFT badge that allows you to register your achievements.

Thus, during the event, there will be four OAT to be won. To win them, participants must have all the correct answers per quiz.


These OATs will give you access to some rewards, including :

*  A unique role on our Discord

*  A chance to get the Airdrop role

*  Maybe more

Don’t forget: this is just the first of many events!

We hope to see many of you, and we can’t wait to start!

« Last Edit: August 26, 2022, 01:28:48 AM by 0406Antoxa1982 »

Altcoins Talks - Cryptocurrency Forum

Magnety protocol
« on: August 23, 2022, 12:59:03 PM »

This is an Ad. Advertised sites are not endorsement by our Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise Here Ads bidding Bidding Open


Offline 0406Antoxa1982

  • Hero Member
  • *
  • Activity: 1010
  • points:
    9310
  • Karma: 26
  • https://t.me/KryptoSiaman
  • Trade Count: (0)
  • Referrals: 28
  • Last Active: December 21, 2023, 03:29:41 PM
    • View Profile

  • Total Badges: 22
    Badges: (View All)
    Fifth year Anniversary Fourth year Anniversary 1000 Posts
Magnety protocol
« Reply #1 on: August 25, 2022, 08:29:23 AM »
Magnety protocol

As we are about to release our α version on the testnet, we wanted to give you an short overview of how Magnety is working.

α version architecture



3 main components:

*  Fund initializer: Manage the fund deployment and its initialization

*  Controller: Intermediate between the user and the fund

*  Fund: NFT contract, store tracked assets, and external positions



3 sub-components:

*  Value interpreter: Manage the asset price and conversion rate.

*  Extensions: Store a configuration for each fund.

*  Pre-logic contracts: a set of contracts unique for each DeFi protocol integrated


Let’s explore the protocol through the four main functions.

*  Buy Shares

*  Redeem funds

*  Interact with DeFi

*  Deploy and initialize funds


Let’s first examine the process to acquire shares:

*  As a user, you need to provide the address of the fund, and the amount you want to invest.

*  Allowed Depositor?

First, the comptroller will assert the fund is public or private but you are an allowed depositor by asking for the fund configuration from the policy manager extension.

*  Allowed currency and amount?

The asset you send will be the denomination asset: it is unique to each fund and stored in the fund itself, it can be ETH, BTC, USDC, or whatever, it is used to evaluate performance in general. The amount must respect the min and max amount to invest, given by the policy manager extension.


*  Entrance fee

The entrance fee is given by the fee manager extension, if enabled, x% of this amount will be sent to the fee recipients: 16% to the staking Vault, 4% to the Dao treasury, and 80% to the asset manager (this repartition is the same for each kind of fees).


*  Investment amount to shares



We need to get the price of one share as explained through this very simple formula. The GAV (gross asset value) of the fund is the sum of all the assets and positions of the fund.

To calculate the GAV, we first get the list of all tracked assets and positions of the fund and their amount then we calculate their price one by one benchmarked on the denomination asset of the fund. Here we need the ValueInterpretor component, we provide the asset we want to calculate the price, its amount, and the denomination asset and we finally get the amount of denomination asset.




4 different cases to calculate an asset price:




« Last Edit: August 25, 2022, 08:53:00 AM by 0406Antoxa1982 »

Offline 0406Antoxa1982

  • Hero Member
  • *
  • Activity: 1010
  • points:
    9310
  • Karma: 26
  • https://t.me/KryptoSiaman
  • Trade Count: (0)
  • Referrals: 28
  • Last Active: December 21, 2023, 03:29:41 PM
    • View Profile

  • Total Badges: 22
    Badges: (View All)
    Fifth year Anniversary Fourth year Anniversary 1000 Posts
Re: Magnety protocol
« Reply #2 on: August 27, 2022, 01:11:14 AM »
1. The incoming asset is the denomination asset

The amount is returned.

2. The incoming asset is a supported primitive

The value interpreter calls the Primitive PriceFeed Manager to convert the incoming asset to the denomination asset.




It is important to check if both assets have the same decimals and to have the same asset rate (USD with Pontis Price feed)

S/o to the Pontis team to help us with the implementation 🤟

3. The incoming asset is a derivative asset

Here the goal is to find the underlying assets of the derivative until we obtain a primitive asset whose price is known. Let’s see an example.

I want to get the price of ARFBTC-TST LP from Alpha Road Finance AMM liquidity pool. The ValueInterpretor will recognize it as a derivative and call calcUnderlyingValues from the contract “ARF_LP_helper”.




After calling this function, the value interpreter will receive [ARFBTC, TST] and [ARFBTC_amount, TST_amount] and loop on this tab calling the previous function calculAssetValue. The first asset ARFBTC will be recognized as a primitive and we will get the amount we want with Pontis PriceFeed. The second asset will be recognized as a derivative asset, we realize then the same job but this time with the contract “ARF_token_helper”. We will get the following tab [ARFBTC_amount,ARFBTC] and call one more time the function calculAssetValue. Again, ARFBTC will be recognized as primitive and the amount will be returned. Finally, the two amounts are summed and the result is returned.

Thanks to the Alpha road team to help us with their AMM integration ⚡


4. The incoming asset is an external position

The method is similar to the previous method but with position external position helpers contract.

Now we get the share price, we can get the number of shares, mint the NFT and transfer the amount without the entrance fee to the vault 🚩

We choose to represent shares as NFT better than ERC20 because we need to store the timestamp and the price of the share at the moment of the mint for the timelock and the performance fees. Thus, an NFT can contain one or more shares.


Let’s now examine the process to sell shares and redeem your funds:



You can choose the asset you want to redeem, providing a tab of address and a tab of amount, the sum must be 100%. Also, you choose how many shares you want to sell, If you sell all the shares, the NFT will be burned.

Allowed to Sell?

First, the comptroller will check if you are allowed to sell the shares, depending on the timelock value stored in the policy manager extension and the mint timestamp stored in the NFT. Then we check if the asset manager allowed users to redeem funds, he can block the selling of the shares for a certain period if this policy has been enabled. This is for the asset manager using external positions such as bringing collateral on perpetual protocol or lending fund’s assets.

Allowed currency and amount?

You can receive any assets you want while they are tracked by the fund.

shares to asset amounts

We calculate the share price with the last method and then we calculate the amount of each asset in the tab. We first calculate the value of 1 unity of the asset we want (looking at decimals) in the denomination asset thanks to the ValueInterpreter.


Then we do the same with each asset of the tabs and we get the amount to redeem.

Performance Fee

The performance fee is given by the fee manager extension, if enabled, x% of the plus value on the share will be taken from each asset and sent to the fee recipients.


Exit Fee

The exit fee is given by the fee manager extension, if enabled, x% of the amounts remaining from the performance fee will be taken and sent to the fee recipients.

We then send the remaining amounts to the user 🚩

We saw the entrance fee, exit fee, and the performance fee, but when the asset manager will perceive the management fees?

The management fees can be claimed directly by the asset manager. Like before, he can select a set of assets to redeem.



We first calculate the Fee amount in ETH to redeem



Note that the claimed timestamp is updated after the asset manager claims these fees and it is also initialized at the fund creation.

We then calculate the amount of each asset to send, the same way as we did before to calculate the shares to asset amounts and we send it to the fee recipients.


Let’s now see how the asset manager can interact with DeFi protocols.


Better than creating thousands of adapters for each protocol we integrate on Magnety, we choose to make it more flexible by providing directly the contract address and the selector function to perform the call. Nevertheless, it is important to verify some conditions.

Allowed Call?

The comptroller asks the Policy Manager Extension if the contract and the selector are allowed to be used by this fund. (see later to add allowed protocols to the fund)

Pre logic?

The comptroller will ask the Integration Manager Extension to provide the address of the contract to run prelogic stuff depending on the nature of our call. For example, if we perform a swap on any AMM, we need to make sure the incoming asset is tracked by the fund. If necessary, we call runPreLogic to the right contract and it will analyze the arg _callData to make sure everything is authorized.

Note that for any protocol we integrate we need to write priceFeed and preLogic code.

If we didn’t get any error until here, we call the fund contract and ask for the execution of the call. 🚩


Let’s end with the fund initialization


There are not any special conditions, everyone can create as many funds as they want. Depending on the gas price required to initialize a fund, we will add a tax to prevent any abuse.

We will integrate some new features later but the fund is already highly customizable, you can choose:

*  A fund name and a symbol

*  A denomination asset (must be a primitive)

*  A limit of position (gather asset and external positions)

*  Interval for depositors

*  A fee configuration to monetize your fund (0–5 % for entrance & exit fees and 0–20% for performance & management fees).

*  An integration configuration: select the asset you’ll be allowed to track and the protocol you’ll be able to interact with


The available assets and integrations of the protocol are stored in the Integration Manager Extension. To store your integration configuration, we will make sure they are available on Magnety.

*  Timelock (between 3hours and 15 days)

*  Public or not

If it is not public, you’ll have to add the allowed depositors after the fund initialization.


If you want to modify these rules after the initialization of your fund, you can perform a reconfiguration. You’ll have to wait at least 1 week (which can be changed by the DAO) before you can validate your changes, so the shareholders can sell their shares if they do not agree with your new rules.

After the initialization, you’ll have to activate your fund (mint the first shares). We can’t directly use the buy shares function knowing the share supply and the gross asset value are zero. You’ll be minting 10.000 shares and the price of the share will be the amount you invested / 10.0000.


β version

It can be annoying for a user to manage his fund’s assets from his dashboard. Even for the development, it can be difficult to import each protocol UI and fetch data from Dapps server.



Yes, this is now possible with Staknet account abstraction, which is a great step for on-chain asset management protocols.

From here, you’ll be able to import your fund into your wallet. Because an account address isn’t necessarily linked to a private key we can’t import accounts providing your private key on the most used wallet on Starknet such as Argent X or Braavos. That’s why we are developing our Wallet, and as soon as it will be ready, we will deploy the β version on the testnet. The integration of Magnety wallet on Dapp will be easy thanks to the get-starknet package, which allows dApps to connect to any wallet on StarkNet

 

ETH & ERC20 Tokens Donations: 0x2143F7146F0AadC0F9d85ea98F23273Da0e002Ab
BNB & BEP20 Tokens Donations: 0xcbDAB774B5659cB905d4db5487F9e2057b96147F
BTC Donations: bc1qjf99wr3dz9jn9fr43q28x0r50zeyxewcq8swng
BTC Tips for Moderators: 1Pz1S3d4Aiq7QE4m3MmuoUPEvKaAYbZRoG
Powered by SMFPacks Social Login Mod