Connectorto initiate one of four functional modules (
Connectoruses EOS node address and an array of private keys. Transactions would be signed with given keys and sent to blockchain through given node.
create- creates new position, using specified amount of EOS as collateral and issuing specified amount of EOSDT to creator. If
eosAmountarg is equal to zero, creates an empty position.
createWithReferral- same as
create, but also sets a referral on position.
close- used to close a position in event of a global shutdown.
del- deletes position that has 0 debt.
give- transfers position ownership to another account.
addCollateral- sends EOS to position to increase it's collateralization.
deleteCollateral- returns specified part of used collateral to user if LTV stays above critical.
generateDebt- issues additional EOSDT for position if this does not bring LTV below critical.
burnbackDebt- repays specified amount of EOSDT decreasing debt.
marginCall- called on a position with critical LTV, to perform a margin call.
getContractEosAmount- returns eosdtcntract EOS balance
getRates- returns table of current system token prices (rates).
getPositionById- returns a position object, selecting it by id.
getAllUserPositions- returns an array of all positions for specified user (up to 100 positions).
getParameters- returns Positions contract parameters.
getSettings- return Positions contract settings.
addReferral- creates new referral, staking given amount of NUT. Rejects when amount is less then
referral_min_stakein positions contract settings.
deleteReferral- removes referral and unstakes that referral's NUT.
getReferralById- returns a referral object.
getReferralByName- returns a referral object.
getAllReferrals- returns table of existing referrals.
getPositionReferral- returns referral of a given position (
undefinedif none exists).
getPositionReferralsTable- returns an array of positions ids and those positions referrals.
getAllReferralPositionsIds- returns an array of positions with given referral id.
propose- creates a proposal.
expire- expires an active proposal.
applyChanges- apply proposed changes (at least 51% of all issued NUT tokens must vote, at least 55% of votes must be positive).
cleanProposal- remove specified amount of votes from an expired proposal. If 0 votes left, removes proposal.
stake- sends NUT tokens to contract, staking them and allowing to vote on proposals.
unstake- unstakes NUT tokens, returning them to user and lowering amount of available votes.
vote- vote for or against a proposal. Vote
0or any other number as "no".
unvote- removes all user votes from a proposal.
voteForBlockProducers- voting with staked NUTs for specified block producers.
stakeAndVoteForBlockProducers- stakes NUT and votes for BPs in one transaction.
getVoterInfo- returns amount of NUTs staked by account in EOSDT Governance contract and their unstake date.
getVoterInfosTable- returns the whole table of information on accounts that staked NUT
getVotes- returns an array with all votes (up to 1000).
getProposals- returns an array with all proposals (up to 1000).
getBpVotes- returns array of block producers names and amount of NUT votes for them.
getProxyInfo- returns voter info for
getSettings- returns governance contract settings.
getBpPosition- returns information about registered block producer.
getAllBpPositions- returns an array of objects, that contain information about registered block producers.
registerBlockProducer- registers a block producer in BP voting reward program.
changeBlockProducerReward- changes amount of EOS reward payed out by block producer.
unRegisterBlockProducer- make block producer position inactive.
depositEos- deposit EOS to block producer position.
marginCallAndBuyoutEos- performes margin call on a position and transfers specified amount of EOSDT to buyout freed EOS.
transferEos- sends EOS to Liquidator contract. It is used to buyout surplus debt with discount.
transferEosdt- sends EOSDT to liquidator contract. It is used to cancel bad debt and buyout liquidator EOS with discount.
transferNut- sends NUT tokens to liquidator contract. It is used to buyout EOS intended to be bought for NUT tokens (parameter "nut_collat_balance").
getSurplusDebt- returns amount of system surplus debt.
getBadDebt- returns amount of system bad debt.
getEosBalance- returns amount of EOS on liquidator contract balance.
getParameters- returns all liquidator contract parameters.
getNut- returns NUT balance of account
getEosdt- returns EOSDT balance of account
getEos- returns EOS balance of account