npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

@finbook/duo-contract-wrapper

1.3.9 • Public • Published

CircleCI Coverage Status

DUO-CONTRACT-WRAPPER

We provide wrapper classes for our smart contracts. These classes come with simple but informative contract wrappers, making it easier for developers to understand and interact with contracts.

DualClassWrapper

DualClassWrapper has wrappers that interact with DUO structure token Custodian Contracts which include: Beethoven Perpetual, Beethoven M19, Mozart Perpetual, Mozart M19, and more. Refer to our Economic Whitepaper and Section 3.1 of Technical Whitepaper to learn more about these custodian contracts.

Users can use wrappers to create and redeem between tranche tokens and ETH. Additionally, they can calculate the conversion ratio between ETH and tranche tokens, coupon rate or leverage ratio given the custodian contract , as well as net asset value (NAV) of tranche tokens in the system. Users can also check the state of a specific contract.

Contract administrators use wrappers to collect transaction fee from custodian contracts and set parameters of the contract.

EsplanadeWrapper

EsplanadeWrapper manages the custodian's administrator system. This system is designed in a way so that no single account can jeopardize the integrity of contracts. Check Sections 2.6 and 3.4.4 of Technical Whitepaper to learn more about the admin system.

Under this system, each custodian contract has a list of ETH addresses, each assignable to administrative roles such as price feeds, address pool manager, and more. Each administrative role is assigned by one moderator to one unique address in the list, and all administrative addresses are removed from this list once assigned.

Users can use this collection of wrappers to return states, address pool, moderators of each contract. Additionally, users can add or remove address, custodian, and other contracts.

MagiWrapper

MagiWrapper deals with the price oracles for contract. Three price commit processes, or price oracles, are running on AWS, Azure, and GCP to feed prices to the oracle contract, Magi. This minimizes the risk of manipulation of price committing system. More information on price commit can be found in Section 2.3.3 of Technical Whitepaper.

Price oracles can initiate the price commit process and subsequently accepting prices fed to the underlying contract.

Community Reward

As part of our bounty reward program, any bug or issue found will be rewarded with community tokens based on seriousness of the issue.

Community

duo.network

medium

telegram

Copyrights © 2017-19 FinBook. All Rights Reserved.

install

npm i @finbook/duo-contract-wrapper

Downloadsweekly downloads

213

version

1.3.9

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability